Update app.py
Browse files
app.py
CHANGED
@@ -135,7 +135,7 @@ os.environ["HUGGINGFACEHUB_API_TOKEN"] = HUGGINGFACEHUB_API_TOKEN
|
|
135 |
|
136 |
##############################################
|
137 |
#wenn löschen Button geklickt
|
138 |
-
def clear_all(
|
139 |
return gr.File(visible=False)
|
140 |
|
141 |
##############################################
|
@@ -655,6 +655,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
|
|
655 |
predict_event1 = user_input.submit(**transfer_input_args, queue=False,).then(**predict_args)
|
656 |
predict_event2 = submitBtn.click(**transfer_input_args, queue=False,).then(**predict_args)
|
657 |
predict_event3 = upload.upload(file_anzeigen, [upload], [file_display, file_display] ) #.then(**predict_args)
|
|
|
658 |
|
659 |
cancelBtn.click(
|
660 |
cancels=[predict_event1,predict_event2, predict_event3 ]
|
|
|
135 |
|
136 |
##############################################
|
137 |
#wenn löschen Button geklickt
|
138 |
+
def clear_all():
|
139 |
return gr.File(visible=False)
|
140 |
|
141 |
##############################################
|
|
|
655 |
predict_event1 = user_input.submit(**transfer_input_args, queue=False,).then(**predict_args)
|
656 |
predict_event2 = submitBtn.click(**transfer_input_args, queue=False,).then(**predict_args)
|
657 |
predict_event3 = upload.upload(file_anzeigen, [upload], [file_display, file_display] ) #.then(**predict_args)
|
658 |
+
emptyBtn.click(clear_all, [], [file_display])
|
659 |
|
660 |
cancelBtn.click(
|
661 |
cancels=[predict_event1,predict_event2, predict_event3 ]
|