ONEROCKS commited on
Commit
e09bb2c
·
verified ·
1 Parent(s): ced05fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -122,6 +122,7 @@ def export_chat(history):
122
  return file_path
123
 
124
  def list_chat_sessions():
 
125
  files = os.listdir("history")
126
  return sorted([f for f in files if f.endswith(".json")], reverse=True)
127
 
 
122
  return file_path
123
 
124
  def list_chat_sessions():
125
+ os.makedirs("history", exist_ok=True) # Ensure folder exists
126
  files = os.listdir("history")
127
  return sorted([f for f in files if f.endswith(".json")], reverse=True)
128