OuroborosM commited on
Commit
4479d76
·
1 Parent(s): f752db1

update clearall()

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1347,8 +1347,9 @@ def clearall():
1347
  # memory_openai.clear()
1348
  global Filename_Chatbot
1349
  Filename_Chatbot = []
1350
- with open("output.log", "w") as file:
1351
- file.truncate(0)
 
1352
  return [[], gr.update(visible=True), gr.update(visible=False), []]
1353
 
1354
  def retry(history3):
 
1347
  # memory_openai.clear()
1348
  global Filename_Chatbot
1349
  Filename_Chatbot = []
1350
+ file_path = "output.log"
1351
+ if os.path.isfile(file_path):
1352
+ os.remove(file_path)
1353
  return [[], gr.update(visible=True), gr.update(visible=False), []]
1354
 
1355
  def retry(history3):