KleinPenny commited on
Commit
0546cb0
·
verified ·
1 Parent(s): b3d5635

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -135,22 +135,18 @@ def create_interface():
135
  # Chat interface using the custom chatbot instance
136
  chatbot = gr.ChatInterface(
137
  fn=respond,
138
- chatbot=gr.Chatbot(height=500),
139
  submit_btn="Start Chatting"
140
  )
141
- user_start =chatbot.textbox.submit(
142
  fn=update_response_display,
143
  inputs=[],
144
  outputs=[],
145
  )
146
 
147
- # 在用户提交请求的时候
148
- #user_start = chatbot.textbox.submit()
149
-
150
  user_start.then(
151
  fn=bot,
152
  inputs=chatbot.chatbot,
153
- outputs=chatbot.chatbot, # 更新 response_display 的内容
154
  )
155
 
156
  # Associate audio processing function and update component states on click
 
135
  # Chat interface using the custom chatbot instance
136
  chatbot = gr.ChatInterface(
137
  fn=respond,
 
138
  submit_btn="Start Chatting"
139
  )
140
+ user_start = chatbot.textbox.submit(
141
  fn=update_response_display,
142
  inputs=[],
143
  outputs=[],
144
  )
145
 
 
 
 
146
  user_start.then(
147
  fn=bot,
148
  inputs=chatbot.chatbot,
149
+ outputs=chatbot.chatbot
150
  )
151
 
152
  # Associate audio processing function and update component states on click