Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -258,8 +258,6 @@ def handle_accuse_click(request: gr.Request):
|
|
258 |
print (output, win)
|
259 |
|
260 |
def accuse_btn(request: gr.Request):
|
261 |
-
accuse_btn = gr.Button("Accuser")
|
262 |
-
|
263 |
def handle_click():
|
264 |
output, win = handle_accuse_click(request)
|
265 |
#accuse_btn.output = (output, gr.update(visible=False), gr.update(visible=False))
|
@@ -285,15 +283,15 @@ def chatbot_interface(request: gr.Request):
|
|
285 |
css="footer {visibility: hidden !important} .gradio-container {background-color: #2D4059 !important; color: #FFD460 !important;}",
|
286 |
js=js_func
|
287 |
)
|
288 |
-
accuse_button
|
289 |
return chatbot_interface
|
290 |
|
291 |
|
292 |
def main(request: gr.Request):
|
293 |
with gr.Blocks(css="footer {visibility: hidden !important} .gradio-container {background-color: #2D4059 !important; color: #FFD460 !important;}",
|
294 |
js=js_func) as demo:
|
|
|
295 |
chat_interface = chatbot_interface(request)
|
296 |
-
accuse_button = accuse_btn(request)
|
297 |
demo.launch(show_api=False, inline=True)
|
298 |
|
299 |
if __name__ == "__main__":
|
|
|
258 |
print (output, win)
|
259 |
|
260 |
def accuse_btn(request: gr.Request):
|
|
|
|
|
261 |
def handle_click():
|
262 |
output, win = handle_accuse_click(request)
|
263 |
#accuse_btn.output = (output, gr.update(visible=False), gr.update(visible=False))
|
|
|
283 |
css="footer {visibility: hidden !important} .gradio-container {background-color: #2D4059 !important; color: #FFD460 !important;}",
|
284 |
js=js_func
|
285 |
)
|
286 |
+
accuse_button.click(handle_accuse_click,request)
|
287 |
return chatbot_interface
|
288 |
|
289 |
|
290 |
def main(request: gr.Request):
|
291 |
with gr.Blocks(css="footer {visibility: hidden !important} .gradio-container {background-color: #2D4059 !important; color: #FFD460 !important;}",
|
292 |
js=js_func) as demo:
|
293 |
+
accuse_button = gr.Button("Accuser")
|
294 |
chat_interface = chatbot_interface(request)
|
|
|
295 |
demo.launch(show_api=False, inline=True)
|
296 |
|
297 |
if __name__ == "__main__":
|