elibrowne commited on
Commit
187d915
·
1 Parent(s): ed092c2
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -160,6 +160,7 @@ with gr.Blocks(theme = theme) as user_eval:
160
  def update_huggingface(data):
161
  print("Updating data...")
162
  id = data["user_id"]
 
163
  filename = id.replace('@', '_AT_').replace('.', '_DOT_')
164
  # Create a local file that will be uploaded to HuggingFace
165
  with open(filename + ".json", "w") as f:
@@ -374,7 +375,7 @@ with gr.Blocks(theme = theme) as user_eval:
374
  cr["gold_generation"] = [e_h, e_s]
375
  ud["current"] += 1
376
  ud["responses"].append(cr) # adds new answers to current list of responses
377
- update_huggingface(user_id, ud) # persistence — update progress online, save answers
378
  cq, cr = load_current_question(ud, user_id)
379
  return {
380
  selection: gr.Markdown("Advancing to the next question..."),
 
160
  def update_huggingface(data):
161
  print("Updating data...")
162
  id = data["user_id"]
163
+ print(id)
164
  filename = id.replace('@', '_AT_').replace('.', '_DOT_')
165
  # Create a local file that will be uploaded to HuggingFace
166
  with open(filename + ".json", "w") as f:
 
375
  cr["gold_generation"] = [e_h, e_s]
376
  ud["current"] += 1
377
  ud["responses"].append(cr) # adds new answers to current list of responses
378
+ update_huggingface(ud) # persistence — update progress online, save answers
379
  cq, cr = load_current_question(ud, user_id)
380
  return {
381
  selection: gr.Markdown("Advancing to the next question..."),