alexkueck commited on
Commit
746ed24
1 Parent(s): 9b37e55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -428,7 +428,13 @@ def show_success():
428
  return gr.Info(
429
  "System erfolgreich aktualisiert!",
430
  headline="Erfolg!",
431
- elem_id="custom-info"), gr.Textbox(visible = False)
 
 
 
 
 
 
432
 
433
  ########################################
434
  # Bot- test gegen schädliche Bots die die Anwendung testen...
@@ -660,7 +666,7 @@ with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
660
  renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]).then(
661
  fn=update_vectorstore, inputs=None, outputs=output_text).then(
662
  fn=reset_file_input, inputs=None, outputs=upload_pdf_files).success(
663
- fn=show_success).then(fn=lambda: gr.Textbox(label="Status", visible = True), input=None, output=output_text)
664
 
665
  #fn= show_notification, inputs=None) #lambda: gr.Notification("System-Aktualisierung erfolgreich abgeschlossen!"
666
  demo.load(display_files, outputs=file_list)
 
428
  return gr.Info(
429
  "System erfolgreich aktualisiert!",
430
  headline="Erfolg!",
431
+ elem_id="custom-info"),
432
+
433
+ def hide_status():
434
+ return gr.Textbox( visible = False)
435
+
436
+ def show_status():
437
+ return gr.Textbox( label="Status", visible = True)
438
 
439
  ########################################
440
  # Bot- test gegen schädliche Bots die die Anwendung testen...
 
666
  renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]).then(
667
  fn=update_vectorstore, inputs=None, outputs=output_text).then(
668
  fn=reset_file_input, inputs=None, outputs=upload_pdf_files).success(
669
+ fn=show_success).then(fn=hide_status, input=None, output=output_text)
670
 
671
  #fn= show_notification, inputs=None) #lambda: gr.Notification("System-Aktualisierung erfolgreich abgeschlossen!"
672
  demo.load(display_files, outputs=file_list)