alexkueck commited on
Commit
ed036b1
1 Parent(s): 3856d7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -433,6 +433,9 @@ def show_status():
433
  def show_text_status():
434
  return gr.HTML(value='<div style="text-align: center; color: red;">System erfolgreich aktualisiert!</div>', label="Status", visible=True)
435
 
 
 
 
436
  ########################################
437
  # Bot- test gegen schädliche Bots die die Anwendung testen...
438
  # Funktion zur Überprüfung der Benutzereingabe
@@ -505,7 +508,7 @@ with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
505
  validate_btn = gr.Button("Validieren", visible = True)
506
  #validation_result = gr.Text(label="Validierungsergebnis")
507
  """
508
- with gr.Tab("KKG KI-Suche"):
509
  with gr.Row():
510
  #gr.HTML("LI Chatot")
511
  status_display = gr.Markdown("Antwort der KI ...", visible = True) #, elem_id="status_display")
@@ -663,7 +666,7 @@ with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
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, show_progress="hidden")
665
  # Hide on refresh or tab switch
666
- tab2.load(fn=hide_status, inputs=[], outputs=output_text)
667
  demo.load(display_files, outputs=file_list)
668
 
669
  demo.title = "KKG-Suche"
 
433
  def show_text_status():
434
  return gr.HTML(value='<div style="text-align: center; color: red;">System erfolgreich aktualisiert!</div>', label="Status", visible=True)
435
 
436
+ def toggle_visibility(tab):
437
+ return gr.update(visible=False)
438
+
439
  ########################################
440
  # Bot- test gegen schädliche Bots die die Anwendung testen...
441
  # Funktion zur Überprüfung der Benutzereingabe
 
508
  validate_btn = gr.Button("Validieren", visible = True)
509
  #validation_result = gr.Text(label="Validierungsergebnis")
510
  """
511
+ with gr.Tab("KKG KI-Suche") as tab1:
512
  with gr.Row():
513
  #gr.HTML("LI Chatot")
514
  status_display = gr.Markdown("Antwort der KI ...", visible = True) #, elem_id="status_display")
 
666
  fn=update_vectorstore, inputs=None, outputs=output_text).then(
667
  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, show_progress="hidden")
668
  # Hide on refresh or tab switch
669
+ tab2.select(fn=toggle_visibility, inputs=tab1, outputs=output_text)
670
  demo.load(display_files, outputs=file_list)
671
 
672
  demo.title = "KKG-Suche"