Spaces:
Sleeping
Sleeping
Mikeplockhart
commited on
Commit
•
afc3612
1
Parent(s):
bf0561a
Update app.py
Browse files
app.py
CHANGED
@@ -60,20 +60,17 @@ def run_query(query_string: str, collection):
|
|
60 |
meal_string = search_chroma(collection, query_string)
|
61 |
return meal_string
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
gr.
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
inputs=inp,
|
75 |
-
outputs=out
|
76 |
-
)
|
77 |
|
78 |
-
|
79 |
|
|
|
60 |
meal_string = search_chroma(collection, query_string)
|
61 |
return meal_string
|
62 |
|
63 |
+
with gr.Blocks() as meal_search:
|
64 |
+
gr.Markdown("Start typing below and then click **Run** to see the output.")
|
65 |
+
with gr.Row():
|
66 |
+
inp = gr.Textbox(placeholder="What sort of meal are you after?")
|
67 |
+
out = gr.Textbox()
|
68 |
+
btn = gr.Button("Run")
|
69 |
+
btn.click(
|
70 |
+
fn=run_query,
|
71 |
+
inputs=inp,
|
72 |
+
outputs=out
|
73 |
+
)
|
|
|
|
|
|
|
74 |
|
75 |
+
meal_search.launch()
|
76 |
|