JoBeer commited on
Commit
dc2b889
·
1 Parent(s): 925866c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -16
app.py CHANGED
@@ -9,22 +9,11 @@ model = SentenceTransformer('JoBeer/all-mpnet-base-v2-eclass')
9
  corpus = pd.read_excel('corpus.xlsx')
10
 
11
  def predict(i):
12
- name = corpus['did'][i]
13
  return name
14
 
15
- #interface = gr.Interface(fn = predict, inputs = [gr.Textbox(label="Description:", placeholder="z.B. Schaltbefehl Pumpe", lines=1), lines=1)],
16
- # title = 'ECLASS-Suche',
17
- # outputs = gr.outputs.Label(name))
18
- #
19
 
20
- #interface.launch()
21
-
22
-
23
- import gradio as gr
24
-
25
- def greet(name):
26
- return "Hello " + name + "!"
27
-
28
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
29
-
30
- demo.launch()
 
9
  corpus = pd.read_excel('corpus.xlsx')
10
 
11
  def predict(i):
12
+ name = corpus['query'][i]
13
  return name
14
 
15
+ interface = gr.Interface(fn = predict, inputs = gr.Textbox(label="did:", placeholder="z.B. 30", lines=1),
16
+ outputs = 'text',
17
+ title = 'ECLASS-Suche')
 
18
 
19
+ interface.launch()