Update app.py
Browse files
app.py
CHANGED
|
@@ -129,7 +129,7 @@ general_assistant_suche= openai_assistant_suche(client)
|
|
| 129 |
|
| 130 |
##############################################
|
| 131 |
#wenn löschen Button geklickt
|
| 132 |
-
def clear_all(history):
|
| 133 |
global chats
|
| 134 |
dic_history = {schluessel: wert for schluessel, wert in history}
|
| 135 |
summary = "\n\n".join(f'{schluessel}: \n {wert}' for schluessel, wert in dic_history.items())
|
|
@@ -148,7 +148,7 @@ def clear_all(history):
|
|
| 148 |
#die session variable in gradio erweitern und alle fliepath neu in das gr.File hochladen
|
| 149 |
uploaded_file_paths= uploaded_file_paths + [file_path_download]
|
| 150 |
|
| 151 |
-
return None, gr.Image(visible=False), uploaded_file_paths, [], uploaded_file_paths
|
| 152 |
|
| 153 |
|
| 154 |
|
|
@@ -557,7 +557,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
|
|
| 557 |
#Geht nicht, da für alle gleichzeitig sichtbar
|
| 558 |
#chat_selector = gr.CheckboxGroup(label="", choices=update_chat_options())
|
| 559 |
#download_button = gr.Button("Download ausgewählte Chats")
|
| 560 |
-
file_download = gr.File(label="Download-Chat", visible=
|
| 561 |
|
| 562 |
with gr.Tab(label="Parameter Einstellung"):
|
| 563 |
#gr.Markdown("# Parameters")
|
|
|
|
| 129 |
|
| 130 |
##############################################
|
| 131 |
#wenn löschen Button geklickt
|
| 132 |
+
def clear_all(history, uploaded_file_paths):
|
| 133 |
global chats
|
| 134 |
dic_history = {schluessel: wert for schluessel, wert in history}
|
| 135 |
summary = "\n\n".join(f'{schluessel}: \n {wert}' for schluessel, wert in dic_history.items())
|
|
|
|
| 148 |
#die session variable in gradio erweitern und alle fliepath neu in das gr.File hochladen
|
| 149 |
uploaded_file_paths= uploaded_file_paths + [file_path_download]
|
| 150 |
|
| 151 |
+
return None, gr.Image(visible=False), uploaded_file_paths, [], gr.File(uploaded_file_paths, label="Download-Chatverläufe", visible=True, interactive = False)
|
| 152 |
|
| 153 |
|
| 154 |
|
|
|
|
| 557 |
#Geht nicht, da für alle gleichzeitig sichtbar
|
| 558 |
#chat_selector = gr.CheckboxGroup(label="", choices=update_chat_options())
|
| 559 |
#download_button = gr.Button("Download ausgewählte Chats")
|
| 560 |
+
file_download = gr.File(label="Download-Chat", visible=False, interactive = False)
|
| 561 |
|
| 562 |
with gr.Tab(label="Parameter Einstellung"):
|
| 563 |
#gr.Markdown("# Parameters")
|