Spaces:
Running
on
Zero
Running
on
Zero
Update main.py
Browse files
main.py
CHANGED
@@ -40,7 +40,8 @@ with gradio.Blocks() as demo:
|
|
40 |
query = gradio.Textbox(placeholder="Enter search terms...", show_label=False, lines=1, max_lines=1)
|
41 |
with gradio.Accordion("Settings", open=False):
|
42 |
k = gradio.Number(5.0, label="Number of results", precision=0)
|
43 |
-
|
44 |
-
|
|
|
45 |
|
46 |
demo.launch(debug=True)
|
|
|
40 |
query = gradio.Textbox(placeholder="Enter search terms...", show_label=False, lines=1, max_lines=1)
|
41 |
with gradio.Accordion("Settings", open=False):
|
42 |
k = gradio.Number(5.0, label="Number of results", precision=0)
|
43 |
+
results = gradio.Markdown()
|
44 |
+
query.change(fn=search, inputs=[query, k], outputs=results)
|
45 |
+
k.change(fn=search, inputs=[query, k], outputs=results)
|
46 |
|
47 |
demo.launch(debug=True)
|