Zekun Wu commited on
Commit
4911494
1 Parent(s): 61bd9b1
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,11 +12,11 @@ client = AzureOpenAI(azure_endpoint="https://personality-service.openai.azure.co
12
 
13
  TOKEN = os.getenv('hf_token')
14
  def store_feedback(user_input, response, feedback, rating,repo):
15
- dataset = load_dataset(repo, use_auth_token=TOKEN, download_mode="force_redownload", ignore_verifications=True)
16
  new_entry = pd.DataFrame({"user_input": [user_input], "response": [response], "feedback": [feedback], "rating": [rating]})
17
  new_dataset = Dataset.from_pandas(new_entry)
18
  updated_dataset = concatenate_datasets([dataset["train"], new_dataset])
19
- updated_dataset.push_to_hub(repo, private=False, use_auth_token=TOKEN)
20
 
21
  # Function to generate a completion using OpenAI API
22
  def generate_one_completion(message, temperature):
 
12
 
13
  TOKEN = os.getenv('hf_token')
14
  def store_feedback(user_input, response, feedback, rating,repo):
15
+ dataset = load_dataset(repo, token=TOKEN, download_mode="force_redownload", ignore_verifications=True)
16
  new_entry = pd.DataFrame({"user_input": [user_input], "response": [response], "feedback": [feedback], "rating": [rating]})
17
  new_dataset = Dataset.from_pandas(new_entry)
18
  updated_dataset = concatenate_datasets([dataset["train"], new_dataset])
19
+ updated_dataset.push_to_hub(repo, private=False, token=TOKEN)
20
 
21
  # Function to generate a completion using OpenAI API
22
  def generate_one_completion(message, temperature):