Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -251,7 +251,7 @@ def handle_accuse_click(request=None):
|
|
251 |
else:
|
252 |
return generate("", True, "", request)
|
253 |
|
254 |
-
def chatbot_interface(request
|
255 |
chatbot_interface = gr.ChatInterface(
|
256 |
fn=generate,
|
257 |
chatbot=mychatbot,
|
@@ -264,7 +264,8 @@ def chatbot_interface(request=None, accuse_btn=None):
|
|
264 |
css="footer {visibility: hidden !important} .gradio-container {background-color: #2D4059 !important; color: #FFD460 !important;}",
|
265 |
js=js_func
|
266 |
)
|
267 |
-
|
|
|
268 |
return chatbot_interface
|
269 |
|
270 |
|
|
|
251 |
else:
|
252 |
return generate("", True, "", request)
|
253 |
|
254 |
+
def chatbot_interface(request: gr.Request, accuse_btn: gr.Button):
|
255 |
chatbot_interface = gr.ChatInterface(
|
256 |
fn=generate,
|
257 |
chatbot=mychatbot,
|
|
|
264 |
css="footer {visibility: hidden !important} .gradio-container {background-color: #2D4059 !important; color: #FFD460 !important;}",
|
265 |
js=js_func
|
266 |
)
|
267 |
+
if request is not None:
|
268 |
+
accuse_btn.click(handle_accuse_click, inputs=[request], outputs=[])
|
269 |
return chatbot_interface
|
270 |
|
271 |
|