themissingCRAM
commited on
Commit
·
e6a7334
1
Parent(s):
0225d03
gradio
Browse files
app.py
CHANGED
|
@@ -152,13 +152,15 @@ if __name__ == "__main__":
|
|
| 152 |
verbosity_level=10,
|
| 153 |
)
|
| 154 |
with gr.Blocks() as b:
|
|
|
|
| 155 |
chatbot = gr.Chatbot(type="messages", height=1000)
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
|
|
|
| 162 |
stop_generating_button.click(fn= stop_gen,cancels=[reply_button_click_event])
|
| 163 |
|
| 164 |
b.launch()
|
|
|
|
| 152 |
verbosity_level=10,
|
| 153 |
)
|
| 154 |
with gr.Blocks() as b:
|
| 155 |
+
gr.Text(label = "",text="Demo text to sql on paying customers' receipts")
|
| 156 |
chatbot = gr.Chatbot(type="messages", height=1000)
|
| 157 |
+
message_box = gr.Textbox(lines=1, label="chat message (with default sample question)", value="What is the average each customer paid?")
|
| 158 |
+
with gr.Row():
|
| 159 |
+
stop_generating_button = gr.Button("stop generating")
|
| 160 |
+
clear_messages_button = gr.ClearButton([message_box, chatbot])
|
| 161 |
+
enter_button = gr.Button("enter")
|
| 162 |
+
reply_button_click_event = enter_button.click(enter_message, [message_box, chatbot], [message_box, chatbot])
|
| 163 |
+
message_box.submit(enter_message, [message_box, chatbot], [message_box, chatbot])
|
| 164 |
stop_generating_button.click(fn= stop_gen,cancels=[reply_button_click_event])
|
| 165 |
|
| 166 |
b.launch()
|