Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,11 +27,11 @@ def autocomplete(query):
|
|
| 27 |
with gr.Blocks() as demo:
|
| 28 |
gr.Markdown("### Typo-Tolerant Autocomplete")
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
query = gr.Textbox(label="Start typing for autocomplete"
|
| 32 |
autocomplete_output = gr.Textbox(label="Autocomplete Suggestions", lines=5)
|
| 33 |
|
| 34 |
-
#
|
| 35 |
query.change(fn=autocomplete, inputs=query, outputs=autocomplete_output)
|
| 36 |
|
| 37 |
demo.launch()
|
|
|
|
| 27 |
with gr.Blocks() as demo:
|
| 28 |
gr.Markdown("### Typo-Tolerant Autocomplete")
|
| 29 |
|
| 30 |
+
# Textbox without live=True
|
| 31 |
+
query = gr.Textbox(label="Start typing for autocomplete")
|
| 32 |
autocomplete_output = gr.Textbox(label="Autocomplete Suggestions", lines=5)
|
| 33 |
|
| 34 |
+
# Trigger autocomplete on each input change
|
| 35 |
query.change(fn=autocomplete, inputs=query, outputs=autocomplete_output)
|
| 36 |
|
| 37 |
demo.launch()
|