Spaces:
Runtime error
Runtime error
EC2 Default User
commited on
Commit
•
9c417e1
1
Parent(s):
c11fde5
improvements to the gradio UI
Browse files
app.py
CHANGED
@@ -34,4 +34,12 @@ def search(query,top_k=100):
|
|
34 |
ans.append(corpus[hit['corpus_id']])
|
35 |
return ans[0],ans[1],ans[2],ans[3],ans[4]
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
ans.append(corpus[hit['corpus_id']])
|
35 |
return ans[0],ans[1],ans[2],ans[3],ans[4]
|
36 |
|
37 |
+
exp=["Who is steve jobs","What is coldplay","What is a turing test?","What is the most interesting thing about our universe?","What are the most beautiful places on earth?"]
|
38 |
+
|
39 |
+
desc="This is a semantic search engine powered by SentenceTransformers (Nils_Reimers) with a retrieval and reranking system on Wikipedia corous. This will return the top 5 results. Search a query and see how good model is doing."
|
40 |
+
|
41 |
+
inp=gr.inputs.Textbox(lines=1, placeholder=None, default="", label="search you query here")
|
42 |
+
out=gr.outputs.Textbox(type="auto",label="search results")
|
43 |
+
|
44 |
+
iface = gr.Interface(fn=search, inputs=inp, outputs=[out,out,out,out,out],examples=exp,article=desc,title="Neural Search Engine",theme="huggingface",layout='vertical')
|
45 |
+
iface.launch(share=True)
|