Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -22,9 +22,9 @@ def predict(ques):
|
|
22 |
idx = np.argmax([np.mean(arr) for arr in scores])
|
23 |
return answers[idx]
|
24 |
|
25 |
-
|
26 |
-
inputs = gr.Textbox(label='query')
|
27 |
-
outputs = gr.Textbox(label='
|
28 |
title = "Similar faq"
|
29 |
-
description = "
|
30 |
gr.Interface(fn = predict, inputs = inputs, outputs = outputs, title = title, description = description).launch()
|
|
|
22 |
idx = np.argmax([np.mean(arr) for arr in scores])
|
23 |
return answers[idx]
|
24 |
|
25 |
+
examples = ['What is the date of his death?', 'Did Einstein have siblings?', 'Who was his wife?', 'What was Einstein's father's name?', 'At what institutions did he study?']
|
26 |
+
inputs = gr.Textbox(label='query', examples=examples)
|
27 |
+
outputs = gr.Textbox(label='Answers')
|
28 |
title = "Similar faq"
|
29 |
+
description = "Retreive answers of similar queries sing sentence transformers"
|
30 |
gr.Interface(fn = predict, inputs = inputs, outputs = outputs, title = title, description = description).launch()
|