Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,10 +49,10 @@ class Chatbot:
|
|
49 |
openai.api_key = api_key
|
50 |
self.chat_history = []
|
51 |
|
52 |
-
#
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
|
57 |
#scheduler = CommitScheduler(
|
58 |
# repo_id="index",
|
|
|
49 |
openai.api_key = api_key
|
50 |
self.chat_history = []
|
51 |
|
52 |
+
# set chat history data path in data folder (persistent storage)
|
53 |
+
dataset_dir = Path("logs")
|
54 |
+
dataset_dir.mkdir(parents=True, exist_ok=True)
|
55 |
+
self.dataset_path = dataset_dir / f"chat_log_{uuid4()}.json"
|
56 |
|
57 |
#scheduler = CommitScheduler(
|
58 |
# repo_id="index",
|