alexkueck commited on
Commit
d821b62
1 Parent(s): 6f63864

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -163,7 +163,7 @@ def clear_all(history, uploaded_file_paths, chats):
163
  #die session variable in gradio erweitern und alle fliepath neu in das gr.File hochladen
164
  uploaded_file_paths= uploaded_file_paths + [file_path_download]
165
 
166
- return None, gr.Image(visible=False), uploaded_file_paths, [], gr.File(uploaded_file_paths, label="Download-Chatverläufe", visible=True, interactive = False) , chats
167
 
168
 
169
 
@@ -540,7 +540,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
540
 
541
  with gr.Column():
542
  with gr.Column(min_width=50, scale=1):
543
- with gr.Tab(label="Chats ..."):
544
  #Geht nicht, da für alle gleichzeitig sichtbar
545
  #chat_selector = gr.CheckboxGroup(label="", choices=update_chat_options())
546
  #download_button = gr.Button("Download ausgewählte Chats")
@@ -667,7 +667,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
667
  predict_event1 = user_input.submit(**transfer_input_args, queue=False,).then(**predict_args)
668
  predict_event2 = submitBtn.click(**transfer_input_args, queue=False,).then(**predict_args)
669
  predict_event3 = upload.upload(file_anzeigen, [upload], [image_display, image_display, attached_file] ) #.then(**predict_args)
670
- emptyBtn.click(clear_all, [history, uploaded_file_paths, chats], [attached_file, image_display, uploaded_file_paths, history, file_download, chats])
671
  #Bild Anzeige neben dem Button wieder entfernen oder austauschen..
672
  image_display.select(file_loeschen, [], [attached_file, image_display])
673
  #download_button.click(fn=download_chats, inputs=chat_selector, outputs=[file_download])
 
163
  #die session variable in gradio erweitern und alle fliepath neu in das gr.File hochladen
164
  uploaded_file_paths= uploaded_file_paths + [file_path_download]
165
 
166
+ return None, gr.Image(visible=False), uploaded_file_paths, [], gr.File(uploaded_file_paths, label="Download-Chatverläufe", visible=True, interactive = False) , gr.Tab(label="Chats ...", visible = True), chats
167
 
168
 
169
 
 
540
 
541
  with gr.Column():
542
  with gr.Column(min_width=50, scale=1):
543
+ with chat_tab = gr.Tab(label="Chats ...", visible = False):
544
  #Geht nicht, da für alle gleichzeitig sichtbar
545
  #chat_selector = gr.CheckboxGroup(label="", choices=update_chat_options())
546
  #download_button = gr.Button("Download ausgewählte Chats")
 
667
  predict_event1 = user_input.submit(**transfer_input_args, queue=False,).then(**predict_args)
668
  predict_event2 = submitBtn.click(**transfer_input_args, queue=False,).then(**predict_args)
669
  predict_event3 = upload.upload(file_anzeigen, [upload], [image_display, image_display, attached_file] ) #.then(**predict_args)
670
+ emptyBtn.click(clear_all, [history, uploaded_file_paths, chats], [attached_file, image_display, uploaded_file_paths, history, file_download, chat_tab, chats])
671
  #Bild Anzeige neben dem Button wieder entfernen oder austauschen..
672
  image_display.select(file_loeschen, [], [attached_file, image_display])
673
  #download_button.click(fn=download_chats, inputs=chat_selector, outputs=[file_download])