Shamima commited on
Commit
c2b16d2
·
1 Parent(s): 66393ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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='query')
28
  title = "Similar faq"
29
- description = "Retrive answers of similar queries sing sentence transformers"
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()