Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -151,8 +151,11 @@ def clear_all(history, uploaded_file_paths):
|
|
151 |
data = response.json()
|
152 |
# Den "content" auswählen, da dort die Antwort der Ki enthalten ist
|
153 |
result = data['choices'][0]['message']['content']
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
156 |
with open(file_path_download, 'w') as file:
|
157 |
# String in die Datei schreiben
|
158 |
file.write(summary)
|
|
|
151 |
data = response.json()
|
152 |
# Den "content" auswählen, da dort die Antwort der Ki enthalten ist
|
153 |
result = data['choices'][0]['message']['content']
|
154 |
+
worte = result.split()
|
155 |
+
if len(worte) > 2:
|
156 |
+
file_path_download = "data/" + str(len(chats)) + "_"Chatverlauf
|
157 |
+
else:
|
158 |
+
file_path_download = "data/" + str(len(chats)) + "_" + result
|
159 |
with open(file_path_download, 'w') as file:
|
160 |
# String in die Datei schreiben
|
161 |
file.write(summary)
|