Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -132,12 +132,10 @@ def create_interface():
|
|
132 |
visible=False
|
133 |
)
|
134 |
|
135 |
-
chatbot_custom = gr.Chatbot(height=500) # Set height to 500 pixels
|
136 |
-
|
137 |
# Chat interface using the custom chatbot instance
|
138 |
chatbot = gr.ChatInterface(
|
139 |
fn=respond,
|
140 |
-
chatbot=
|
141 |
submit_btn="Start Chatting"
|
142 |
)
|
143 |
user_start =chatbot.textbox.submit(
|
@@ -151,8 +149,8 @@ def create_interface():
|
|
151 |
|
152 |
user_start.then(
|
153 |
fn=bot,
|
154 |
-
inputs=
|
155 |
-
outputs=
|
156 |
)
|
157 |
|
158 |
# Associate audio processing function and update component states on click
|
@@ -178,6 +176,7 @@ def create_interface():
|
|
178 |
|
179 |
|
180 |
|
|
|
181 |
if __name__ == "__main__":
|
182 |
demo = create_interface()
|
183 |
demo.launch()
|
|
|
132 |
visible=False
|
133 |
)
|
134 |
|
|
|
|
|
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(
|
|
|
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
|
|
|
176 |
|
177 |
|
178 |
|
179 |
+
|
180 |
if __name__ == "__main__":
|
181 |
demo = create_interface()
|
182 |
demo.launch()
|