DINGOLANI commited on
Commit
0426cb9
·
verified ·
1 Parent(s): fd80bbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,11 +27,11 @@ def autocomplete(query):
27
  with gr.Blocks() as demo:
28
  gr.Markdown("### Typo-Tolerant Autocomplete")
29
 
30
- # Create a real-time Textbox with live=True
31
- query = gr.Textbox(label="Start typing for autocomplete", live=True)
32
  autocomplete_output = gr.Textbox(label="Autocomplete Suggestions", lines=5)
33
 
34
- # Bind the autocomplete function to the Textbox
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()