Update app.py
Browse files
app.py
CHANGED
@@ -77,29 +77,12 @@ with demo:
|
|
77 |
response += char
|
78 |
yield response
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
|
85 |
-
|
86 |
-
with gr.Row():
|
87 |
-
message_input = gr.Textbox(label="Your message")
|
88 |
-
submit_button = gr.Button("Submit")
|
89 |
-
clear_button = gr.Button("Clear")
|
90 |
-
chatbox = gr.Chatbot()
|
91 |
-
|
92 |
-
submit_button.click(
|
93 |
-
fn=get_response,
|
94 |
-
inputs=message_input,
|
95 |
-
outputs=chatbox
|
96 |
-
)
|
97 |
-
|
98 |
-
clear_button.click(
|
99 |
-
fn=clear_chat,
|
100 |
-
inputs=[],
|
101 |
-
outputs=chatbox
|
102 |
-
)
|
103 |
|
104 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
105 |
with gr.TabItem("🏆 LLM Leadeboard", elem_id="llm-benchmark-table", id=0):
|
|
|
77 |
response += char
|
78 |
yield response
|
79 |
|
80 |
+
with gr.Blocks() as demo:
|
81 |
+
chatbot = gr.Chatbot()
|
82 |
+
msg = gr.Textbox()
|
83 |
+
clear = gr.ClearButton([msg, chatbot])
|
84 |
|
85 |
+
msg.submit(get_response, [msg, chatbot], [msg, chatbot])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
88 |
with gr.TabItem("🏆 LLM Leadeboard", elem_id="llm-benchmark-table", id=0):
|