initial code
Browse files
app.py
CHANGED
@@ -59,17 +59,18 @@ def respond(query):
|
|
59 |
|
60 |
return response.objects[0].properties
|
61 |
|
62 |
-
examples = gr.Examples(inputs=["Wine", "Movies", "Sports"])
|
63 |
-
demo = gr.Interface(
|
64 |
-
|
65 |
label="Search the Jeopardy Vector Database powered by Weaviate",
|
66 |
info="Submit a Query:",
|
67 |
lines=1,
|
68 |
-
value=
|
69 |
),
|
70 |
-
examples=
|
71 |
outputs="textbox"
|
72 |
)
|
73 |
|
|
|
74 |
if __name__ == "__main__":
|
75 |
demo.launch()
|
|
|
59 |
|
60 |
return response.objects[0].properties
|
61 |
|
62 |
+
examples = gr.Examples(inputs=["Guitars", "Wine", "Movies", "Sports"])
|
63 |
+
demo = gr.Interface(
|
64 |
+
gr.Textbox(
|
65 |
label="Search the Jeopardy Vector Database powered by Weaviate",
|
66 |
info="Submit a Query:",
|
67 |
lines=1,
|
68 |
+
value=examples[0][0]
|
69 |
),
|
70 |
+
gr.Examples(examples, fn=respond, inputs=inputs),
|
71 |
outputs="textbox"
|
72 |
)
|
73 |
|
74 |
+
|
75 |
if __name__ == "__main__":
|
76 |
demo.launch()
|