Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def predict(name, description, language, classCode='nofilter', top_k=10):
|
|
61 |
irdis.append(corpus_filtered.iloc[output[0][i].get('corpus_id'),0])
|
62 |
scores.append(output[0][i].get('score'))
|
63 |
|
64 |
-
predictions = pd.DataFrame({'preferedName' : preferedNames, '
|
65 |
return predictions
|
66 |
|
67 |
#gradio user interface
|
@@ -85,7 +85,7 @@ with gr.Blocks() as demo:
|
|
85 |
search = gr.Button("search")
|
86 |
|
87 |
#output
|
88 |
-
prediction_df = gr.Dataframe(headers = ['preferedName', '
|
89 |
|
90 |
#Hinterlegt Search-Function für button "search"
|
91 |
search.click(fn=predict, inputs=[name_tx,description_tx,language_drop,classcode_tx,top_k_nu], outputs=prediction_df)
|
|
|
61 |
irdis.append(corpus_filtered.iloc[output[0][i].get('corpus_id'),0])
|
62 |
scores.append(output[0][i].get('score'))
|
63 |
|
64 |
+
predictions = pd.DataFrame({'preferedName' : preferedNames, 'irdi' : irdis,'score' : scores,'definition' : definitions})
|
65 |
return predictions
|
66 |
|
67 |
#gradio user interface
|
|
|
85 |
search = gr.Button("search")
|
86 |
|
87 |
#output
|
88 |
+
prediction_df = gr.Dataframe(headers = ['preferedName', 'irdi', 'score', 'definition'])
|
89 |
|
90 |
#Hinterlegt Search-Function für button "search"
|
91 |
search.click(fn=predict, inputs=[name_tx,description_tx,language_drop,classcode_tx,top_k_nu], outputs=prediction_df)
|