Update app.py
Browse files
app.py
CHANGED
|
@@ -420,6 +420,11 @@ def reset_file_input():
|
|
| 420 |
# Zurücksetzen des file inputs
|
| 421 |
return gr.update(value=None)
|
| 422 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 423 |
########################################
|
| 424 |
# Bot- test gegen schädliche Bots die die Anwendung testen...
|
| 425 |
# Funktion zur Überprüfung der Benutzereingabe
|
|
@@ -647,7 +652,7 @@ with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
|
|
| 647 |
renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]).then(
|
| 648 |
fn=update_vectorstore, inputs=None, outputs=output_text).then(
|
| 649 |
fn=reset_file_input, inputs=None, outputs=upload_pdf_files).then(
|
| 650 |
-
fn=
|
| 651 |
demo.load(display_files, outputs=file_list)
|
| 652 |
|
| 653 |
demo.title = "KKG-Suche"
|
|
|
|
| 420 |
# Zurücksetzen des file inputs
|
| 421 |
return gr.update(value=None)
|
| 422 |
|
| 423 |
+
def show_notification():
|
| 424 |
+
print("Funktion wurde aufgerufen")
|
| 425 |
+
return gr.Notification("System erfolgreich aktualisiert!", title="Fertig", type="info")
|
| 426 |
+
|
| 427 |
+
|
| 428 |
########################################
|
| 429 |
# Bot- test gegen schädliche Bots die die Anwendung testen...
|
| 430 |
# Funktion zur Überprüfung der Benutzereingabe
|
|
|
|
| 652 |
renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]).then(
|
| 653 |
fn=update_vectorstore, inputs=None, outputs=output_text).then(
|
| 654 |
fn=reset_file_input, inputs=None, outputs=upload_pdf_files).then(
|
| 655 |
+
fn= show_notification, title="Fertig", type="info"), inputs=None) #lambda: gr.Notification("System-Aktualisierung erfolgreich abgeschlossen!"
|
| 656 |
demo.load(display_files, outputs=file_list)
|
| 657 |
|
| 658 |
demo.title = "KKG-Suche"
|