Update app.py
Browse files
app.py
CHANGED
@@ -145,13 +145,13 @@ def clear_all(history, uploaded_file_paths):
|
|
145 |
chats[0]=summary
|
146 |
|
147 |
#file_path_download = save_and_download(summary)
|
148 |
-
file_path_download = str(len(chats)+1) + "_" + process_chatverlauf("Gib eine Überschrift aus maximal 2 Worten zu folgendem Text an", MODEL_NAME, OAI_API_KEY)
|
149 |
with open(file_path_download, 'w') as file:
|
150 |
# String in die Datei schreiben
|
151 |
file.write(summary)
|
152 |
|
153 |
#die session variable in gradio erweitern und alle fliepath neu in das gr.File hochladen
|
154 |
-
uploaded_file_paths=
|
155 |
|
156 |
return None, gr.Image(visible=False), uploaded_file_paths, [], gr.File(uploaded_file_paths, label="Download-Chatverläufe", visible=True, interactive = False)
|
157 |
|
|
|
145 |
chats[0]=summary
|
146 |
|
147 |
#file_path_download = save_and_download(summary)
|
148 |
+
file_path_download = "data/" + str(len(chats)+1) + "_" + process_chatverlauf("Gib eine Überschrift aus maximal 2 Worten zu folgendem Text an", MODEL_NAME, OAI_API_KEY)
|
149 |
with open(file_path_download, 'w') as file:
|
150 |
# String in die Datei schreiben
|
151 |
file.write(summary)
|
152 |
|
153 |
#die session variable in gradio erweitern und alle fliepath neu in das gr.File hochladen
|
154 |
+
uploaded_file_paths= uploaded_file_paths + [file_path_download]
|
155 |
|
156 |
return None, gr.Image(visible=False), uploaded_file_paths, [], gr.File(uploaded_file_paths, label="Download-Chatverläufe", visible=True, interactive = False)
|
157 |
|