Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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()
|