Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -191,17 +191,16 @@ with gr.Blocks() as demo:
|
|
| 191 |
height=500
|
| 192 |
)
|
| 193 |
with gr.Column():
|
| 194 |
-
# 创建一个文本输入框用于聊天
|
| 195 |
chat_input = gr.Textbox(placeholder="Type your message here...", label="Chat")
|
| 196 |
chat_output = gr.Textbox(label="Response", interactive=False)
|
| 197 |
|
| 198 |
-
# 示例组件,始终可见
|
| 199 |
examples = gr.Examples(
|
| 200 |
-
examples=['Top 10 prod_cate sales
|
| 201 |
inputs=chat_input
|
| 202 |
)
|
| 203 |
|
| 204 |
-
|
| 205 |
-
|
|
|
|
| 206 |
|
| 207 |
demo.launch()
|
|
|
|
| 191 |
height=500
|
| 192 |
)
|
| 193 |
with gr.Column():
|
|
|
|
| 194 |
chat_input = gr.Textbox(placeholder="Type your message here...", label="Chat")
|
| 195 |
chat_output = gr.Textbox(label="Response", interactive=False)
|
| 196 |
|
|
|
|
| 197 |
examples = gr.Examples(
|
| 198 |
+
examples=['Top 10 prod_cate sales', 'Top product in category Seafood'],
|
| 199 |
inputs=chat_input
|
| 200 |
)
|
| 201 |
|
| 202 |
+
submit_button = gr.Button("生成响应")
|
| 203 |
+
|
| 204 |
+
submit_button.click(fn=random_response, inputs=chat_input, outputs=[chat_output, temp_img])
|
| 205 |
|
| 206 |
demo.launch()
|