not-lain commited on
Commit
46078b9
·
verified ·
1 Parent(s): 77b97cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -86,12 +86,12 @@ def push_results_to_hub(user_answers, token: gr.OAuthToken | None):
86
  gr.Warning(
87
  f"Score {grade:.1%} below passing threshold of {float(EXAM_PASSING_SCORE):.1%}"
88
  )
89
- return f"You scored {grade:.1%}. Please try again to achieve at least {float(EXAM_PASSING_SCORE):.1%}"
90
 
91
  gr.Info("Submitting answers to the Hub. Please wait...", duration=2)
92
 
93
  user_info = whoami(token=token.token)
94
- repo_id = f"{EXAM_DATASET_ID}_student_responses"
95
  # TODO:
96
  # check if username already has "username.parquet" in the dataset and download that (or read values directly from dataset viewer if possible)
97
  # instead of replacing the values check if the new score is better than the old one
 
86
  gr.Warning(
87
  f"Score {grade:.1%} below passing threshold of {float(EXAM_PASSING_SCORE):.1%}"
88
  )
89
+ return
90
 
91
  gr.Info("Submitting answers to the Hub. Please wait...", duration=2)
92
 
93
  user_info = whoami(token=token.token)
94
+ repo_id = f"{EXAM_DATASET_ID}_student_scores"
95
  # TODO:
96
  # check if username already has "username.parquet" in the dataset and download that (or read values directly from dataset viewer if possible)
97
  # instead of replacing the values check if the new score is better than the old one