alexkueck commited on
Commit
2567af5
1 Parent(s): 5a0a2fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- print (result)
155
- file_path_download = "data/" + str(len(chats)) + "_" + result
 
 
 
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)