Spaces:
Runtime error
Runtime error
Commit
·
4204be0
1
Parent(s):
e117310
test examples gradio
Browse files
app.py
CHANGED
@@ -28,4 +28,10 @@ def search(query,top_k=100):
|
|
28 |
for idx, hit in enumerate(hits[0:5]):
|
29 |
ans.append(corpus[hit['corpus_id']])
|
30 |
return ans[0],ans[1],ans[2],ans[3],ans[4]
|
31 |
-
iface = gr.Interface(fn=search, inputs=["text"], outputs=["textbox","textbox","textbox","textbox","textbox"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
for idx, hit in enumerate(hits[0:5]):
|
29 |
ans.append(corpus[hit['corpus_id']])
|
30 |
return ans[0],ans[1],ans[2],ans[3],ans[4]
|
31 |
+
iface = gr.Interface(fn=search, inputs=["text"], outputs=["textbox","textbox","textbox","textbox","textbox"]
|
32 |
+
examples=[
|
33 |
+
[2, "cat", "park", ["ran", "swam"], True],
|
34 |
+
[4, "dog", "zoo", ["ate", "swam"], False],
|
35 |
+
[10, "bird", "road", ["ran"], False],
|
36 |
+
[8, "cat", "zoo", ["ate"], True],
|
37 |
+
],).launch(share=True)
|