ThomasSimonini HF Staff commited on
Commit
c8ac78a
·
verified ·
1 Parent(s): 4195ac0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,7 +7,7 @@ import os
7
  # Load the datasets
8
  SCORES_DATASET = "agents-course/unit4-students-scores"
9
  CERTIFICATES_DATASET = "agents-course/course-certificates-of-excellence"
10
- THRESOLD SCORE = 45
11
 
12
  # Check the score based on username
13
  def check_user_score(username):
@@ -52,8 +52,8 @@ def handle_certificate(name, request: gr.Request):
52
 
53
  score = user_score["score"]
54
 
55
- if score < THRESOLD SCORE:
56
- return f"Your score is {score}. You need at least 65 to pass.", None
57
 
58
  # Passed: check if already in certificate dataset
59
  if not has_certificate_entry(username):
 
7
  # Load the datasets
8
  SCORES_DATASET = "agents-course/unit4-students-scores"
9
  CERTIFICATES_DATASET = "agents-course/course-certificates-of-excellence"
10
+ THRESOLD_SCORE = 45
11
 
12
  # Check the score based on username
13
  def check_user_score(username):
 
52
 
53
  score = user_score["score"]
54
 
55
+ if score < THRESOLD_SCORE:
56
+ return f"Your score is {score}. You need at least {THRESOLD_SCORE} to pass.", None
57
 
58
  # Passed: check if already in certificate dataset
59
  if not has_certificate_entry(username):