Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
chatUI.py
CHANGED
|
@@ -238,7 +238,7 @@ class ChatApp:
|
|
| 238 |
def save_conversation(self, chat_history):
|
| 239 |
"""Save the conversation to a file in the /data/conversations directory."""
|
| 240 |
# Use the persistent storage path for Hugging Face Spaces
|
| 241 |
-
folder = os.path.join("data
|
| 242 |
if not os.path.exists(folder):
|
| 243 |
os.makedirs(folder, exist_ok=True)
|
| 244 |
|
|
@@ -302,7 +302,7 @@ class ChatApp:
|
|
| 302 |
def save_data_collection(self, user_question, ranked_responses):
|
| 303 |
"""Save the question, responses, and their rankings in a format optimized for DPO training."""
|
| 304 |
# Use the persistent storage path for Hugging Face Spaces
|
| 305 |
-
folder = os.path.join("data
|
| 306 |
if not os.path.exists(folder):
|
| 307 |
os.makedirs(folder, exist_ok=True)
|
| 308 |
|
|
|
|
| 238 |
def save_conversation(self, chat_history):
|
| 239 |
"""Save the conversation to a file in the /data/conversations directory."""
|
| 240 |
# Use the persistent storage path for Hugging Face Spaces
|
| 241 |
+
folder = os.path.join("/data/conversations")
|
| 242 |
if not os.path.exists(folder):
|
| 243 |
os.makedirs(folder, exist_ok=True)
|
| 244 |
|
|
|
|
| 302 |
def save_data_collection(self, user_question, ranked_responses):
|
| 303 |
"""Save the question, responses, and their rankings in a format optimized for DPO training."""
|
| 304 |
# Use the persistent storage path for Hugging Face Spaces
|
| 305 |
+
folder = os.path.join("/data/dpo_training")
|
| 306 |
if not os.path.exists(folder):
|
| 307 |
os.makedirs(folder, exist_ok=True)
|
| 308 |
|