Update app.py
Browse files
app.py
CHANGED
@@ -425,14 +425,14 @@ def show_success():
|
|
425 |
return gr.Info( "System erfolgreich aktualisiert!")
|
426 |
|
427 |
def hide_status():
|
|
|
428 |
return gr.HTML(value="", label="Status", visible=False) #gr.Textbox( visible = False)
|
429 |
|
430 |
def show_status():
|
431 |
return gr.HTML(value="", label="Status", visible=True) ##gr.Textbox( label="Status", visible = True)
|
432 |
|
433 |
def show_text_status():
|
434 |
-
|
435 |
-
return gr.HTML(value="System erfolgreich aktualisiert!", label="Status", visible=True)
|
436 |
|
437 |
########################################
|
438 |
# Bot- test gegen schädliche Bots die die Anwendung testen...
|
@@ -661,9 +661,8 @@ with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
|
|
661 |
# Hochladen der Dateien und dann Vektorstore aktualisieren
|
662 |
renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]).then(
|
663 |
fn=update_vectorstore, inputs=None, outputs=output_text).then(
|
664 |
-
fn=reset_file_input, inputs=None, outputs=upload_pdf_files).then(fn=show_text_status, inputs=None, outputs=output_text).
|
665 |
-
fn=show_success)
|
666 |
-
|
667 |
#fn= show_notification, inputs=None) #lambda: gr.Notification("System-Aktualisierung erfolgreich abgeschlossen!"
|
668 |
demo.load(display_files, outputs=file_list)
|
669 |
|
|
|
425 |
return gr.Info( "System erfolgreich aktualisiert!")
|
426 |
|
427 |
def hide_status():
|
428 |
+
time.sleep(3)
|
429 |
return gr.HTML(value="", label="Status", visible=False) #gr.Textbox( visible = False)
|
430 |
|
431 |
def show_status():
|
432 |
return gr.HTML(value="", label="Status", visible=True) ##gr.Textbox( label="Status", visible = True)
|
433 |
|
434 |
def show_text_status():
|
435 |
+
return gr.HTML(value="<div style="text-align: center; color: red;">System erfolgreich aktualisiert!</div>", label="Status", visible=True)
|
|
|
436 |
|
437 |
########################################
|
438 |
# Bot- test gegen schädliche Bots die die Anwendung testen...
|
|
|
661 |
# Hochladen der Dateien und dann Vektorstore aktualisieren
|
662 |
renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]).then(
|
663 |
fn=update_vectorstore, inputs=None, outputs=output_text).then(
|
664 |
+
fn=reset_file_input, inputs=None, outputs=upload_pdf_files).then(fn=show_text_status, inputs=None, outputs=output_text).then(fn=hide_status, inputs=None, outputs=output_text)
|
665 |
+
#.success(fn=show_success)
|
|
|
666 |
#fn= show_notification, inputs=None) #lambda: gr.Notification("System-Aktualisierung erfolgreich abgeschlossen!"
|
667 |
demo.load(display_files, outputs=file_list)
|
668 |
|