Update app.py
Browse files
app.py
CHANGED
@@ -428,6 +428,7 @@ def show_message():
|
|
428 |
return gr.update(visible=True, value="System erfolgreich aktualisiert!")
|
429 |
|
430 |
def hide_message():
|
|
|
431 |
return gr.update(visible=False)
|
432 |
|
433 |
########################################
|
@@ -669,8 +670,8 @@ with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
|
|
669 |
# Hochladen der Dateien und dann Vektorstore aktualisieren
|
670 |
renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]).then(
|
671 |
fn=update_vectorstore, inputs=None, outputs=output_text).then(
|
672 |
-
fn=reset_file_input, inputs=None, outputs=upload_pdf_files).then(
|
673 |
-
fn=hide_message, inputs=None, outputs=message
|
674 |
|
675 |
#fn= show_notification, inputs=None) #lambda: gr.Notification("System-Aktualisierung erfolgreich abgeschlossen!"
|
676 |
demo.load(display_files, outputs=file_list)
|
|
|
428 |
return gr.update(visible=True, value="System erfolgreich aktualisiert!")
|
429 |
|
430 |
def hide_message():
|
431 |
+
time.sleep(3) # Wartet 3 Sekunden
|
432 |
return gr.update(visible=False)
|
433 |
|
434 |
########################################
|
|
|
670 |
# Hochladen der Dateien und dann Vektorstore aktualisieren
|
671 |
renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]).then(
|
672 |
fn=update_vectorstore, inputs=None, outputs=output_text).then(
|
673 |
+
fn=reset_file_input, inputs=None, outputs=upload_pdf_files).then(fn=show_message, inputs=None, outputs=message).then(
|
674 |
+
fn=hide_message, inputs=None, outputs=message)
|
675 |
|
676 |
#fn= show_notification, inputs=None) #lambda: gr.Notification("System-Aktualisierung erfolgreich abgeschlossen!"
|
677 |
demo.load(display_files, outputs=file_list)
|