macadeliccc commited on
Commit
9ecda37
1 Parent(s): 6940b0d
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -50,17 +50,17 @@ def chat_with_ochat(message):
50
 
51
  # Create a Gradio Blocks interface
52
  with gr.Blocks() as app:
53
- gr.Markdown("### vLLM OpenChat-3.5 Interface")
54
  gr.Markdown("Type your message and get a response from the ochat server.")
55
  with gr.Row():
56
  input_text = gr.Textbox(label="Your Message")
57
  submit_button = gr.Button("Send")
58
  output_text = gr.Textbox(label="ochat Response", interactive=False)
59
 
60
- def update_output():
61
- response = chat_with_ochat(input_text.value)
62
  output_text.update(value=response)
63
 
64
- submit_button.click(fn=update_output)
65
 
66
  app.launch()
 
50
 
51
  # Create a Gradio Blocks interface
52
  with gr.Blocks() as app:
53
+ gr.Markdown("### ochat Chat Interface")
54
  gr.Markdown("Type your message and get a response from the ochat server.")
55
  with gr.Row():
56
  input_text = gr.Textbox(label="Your Message")
57
  submit_button = gr.Button("Send")
58
  output_text = gr.Textbox(label="ochat Response", interactive=False)
59
 
60
+ def update_output(input_message):
61
+ response = chat_with_ochat(input_message)
62
  output_text.update(value=response)
63
 
64
+ submit_button.click(fn=update_output, inputs=[input_text], outputs=[])
65
 
66
  app.launch()