Update app.py
Browse files
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 |
|