JoBeer commited on
Commit
10520fd
·
1 Parent(s): 88579f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -6,6 +6,19 @@ import pandas as pd
6
 
7
  model = SentenceTransformer('JoBeer/all-mpnet-base-v2-eclass')
8
 
9
- corpus = pd.read_excel('')
10
 
11
- title = 'ECLASS-Property-Search'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  model = SentenceTransformer('JoBeer/all-mpnet-base-v2-eclass')
8
 
9
+ corpus = pd.read_excel('corpus.xlsx')
10
 
11
+ def predict(i):
12
+ name = corpus['did'][i]
13
+ return name
14
+
15
+ gr.Interface(
16
+ predict,
17
+ inputs=gr.inputs.Image(label="Upload hot dog candidate", type="filepath"),
18
+ outputs=gr.outputs.Label(num_top_classes=2),
19
+ title="Hot Dog? Or Not?",
20
+ ).launch()
21
+
22
+ gr.Interface(fn = predict, inputs = [gr.Textbox(label="Description:", placeholder="z.B. Schaltbefehl Pumpe", lines=1), lines=1)],
23
+ title = 'ECLASS-Suche',
24
+ outputs = gr.outputs.Label(name)).launch()