Yusuke710 commited on
Commit
341863f
·
verified ·
1 Parent(s): e28bc31

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. chatUI.py +3 -3
chatUI.py CHANGED
@@ -236,9 +236,9 @@ class ChatApp:
236
  os.environ["OPENROUTER_API_KEY"] = api_key
237
 
238
  def save_conversation(self, chat_history):
239
- """Save the conversation to a file in the /home/user/conversations directory."""
240
  # Use the persistent storage path for Hugging Face Spaces
241
- folder = os.path.join("/home/user/conversations")
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("/home/user/dpo_training")
306
  if not os.path.exists(folder):
307
  os.makedirs(folder, exist_ok=True)
308
 
 
236
  os.environ["OPENROUTER_API_KEY"] = api_key
237
 
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