Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -244,6 +244,8 @@ mychatbot = gr.Chatbot(
|
|
244 |
show_label=False,
|
245 |
)
|
246 |
|
|
|
|
|
247 |
|
248 |
def chatbot_interface(request: gr.Request, accuse_btn: gr.Button):
|
249 |
chatbot_interface = gr.ChatInterface(
|
@@ -258,7 +260,7 @@ def chatbot_interface(request: gr.Request, accuse_btn: gr.Button):
|
|
258 |
css="footer {visibility: hidden !important} .gradio-container {background-color: #2D4059 !important; color: #FFD460 !important;}",
|
259 |
js=js_func
|
260 |
)
|
261 |
-
accuse_btn.click(
|
262 |
return chatbot_interface
|
263 |
|
264 |
|
|
|
244 |
show_label=False,
|
245 |
)
|
246 |
|
247 |
+
def handle_accuse_click(request):
|
248 |
+
return generate("", True, "", request)
|
249 |
|
250 |
def chatbot_interface(request: gr.Request, accuse_btn: gr.Button):
|
251 |
chatbot_interface = gr.ChatInterface(
|
|
|
260 |
css="footer {visibility: hidden !important} .gradio-container {background-color: #2D4059 !important; color: #FFD460 !important;}",
|
261 |
js=js_func
|
262 |
)
|
263 |
+
accuse_btn.click(handle_accuse_click, inputs=[request], outputs=[])
|
264 |
return chatbot_interface
|
265 |
|
266 |
|