Spaces:
Running
on
Zero
Running
on
Zero
macadeliccc
commited on
Commit
•
9ecda37
1
Parent(s):
6940b0d
test
Browse files
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("###
|
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(
|
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()
|