Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,11 +39,12 @@ def predict(msg, history=[]):
|
|
39 |
with gr.Blocks() as demo:
|
40 |
state = gr.State([])
|
41 |
with gr.Row():
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
47 |
|
48 |
bu.click(predict, [txt, state], [chatbot, state, answer_text])
|
49 |
|
|
|
39 |
with gr.Blocks() as demo:
|
40 |
state = gr.State([])
|
41 |
with gr.Row():
|
42 |
+
with gr.Column():
|
43 |
+
chatbot = gr.Chatbot()
|
44 |
+
txt = gr.Textbox(label='输入框', placeholder='输入消息...')
|
45 |
+
bu = gr.Button(value='发送消息')
|
46 |
+
with gr.Column():
|
47 |
+
answer_text = gr.Textbox(label='回复')
|
48 |
|
49 |
bu.click(predict, [txt, state], [chatbot, state, answer_text])
|
50 |
|