wop commited on
Commit
44b3bcb
1 Parent(s): 7416d8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -78,7 +78,9 @@ def chat_interface(message):
78
  return response
79
 
80
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
81
- demo.register("message", gr.Textbox(label="Your question"))
82
- demo.register("response", gr.Textbox(label="Assistant's response"))
 
83
 
84
- demo.launch(fn=chat_interface, inputs=["message"], outputs=["response"])
 
 
78
  return response
79
 
80
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
81
+ # Use "Textbox" components for both input and output
82
+ input_textbox = gr.Textbox(label="Your question")
83
+ output_textbox = gr.Textbox(label="Assistant's response", value="", editable=False)
84
 
85
+ # Use demo.launch instead of demo.queue().launch()
86
+ demo.launch(fn=chat_interface, inputs=input_textbox, outputs=output_textbox)