Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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['
|
13 |
return name
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
#
|
19 |
|
20 |
-
|
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()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|