Jai12345 commited on
Commit
5288e89
1 Parent(s): 83fc981

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,7 +34,7 @@ def search(query, top_k=100):
34
 
35
  for idx, hit in enumerate(hits[0:5]):
36
  ans.append(corpus[hit['corpus_id']])
37
- return ans[0]
38
 
39
 
40
  exp = ["Who is steve jobs?", "Who is Salman Khan?", "Who is Kevin Hart?",
@@ -45,6 +45,6 @@ desc = "This is a semantic search engine made with sentence transformer."
45
  inp = gr.inputs.Textbox(lines=1, placeholder=None, default="", label="search you query here")
46
  out = gr.outputs.Textbox(type="auto", label="search results")
47
 
48
- iface = gr.Interface(fn=search, inputs=inp, outputs=[out], examples=exp, article=desc,
49
  title="Search Engine", theme="huggingface", layout='vertical')
50
  iface.launch()
 
34
 
35
  for idx, hit in enumerate(hits[0:5]):
36
  ans.append(corpus[hit['corpus_id']])
37
+ return ans[0],ans[1],ans[2]
38
 
39
 
40
  exp = ["Who is steve jobs?", "Who is Salman Khan?", "Who is Kevin Hart?",
 
45
  inp = gr.inputs.Textbox(lines=1, placeholder=None, default="", label="search you query here")
46
  out = gr.outputs.Textbox(type="auto", label="search results")
47
 
48
+ iface = gr.Interface(fn=search, inputs=inp, outputs=[out,out,out], examples=exp, article=desc,
49
  title="Search Engine", theme="huggingface", layout='vertical')
50
  iface.launch()