ThomasSimonini HF Staff commited on
Commit
9b1ede4
·
verified ·
1 Parent(s): 570b457

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -67,10 +67,10 @@ def handle_certificate(name, profile: gr.OAuthProfile):
67
  score = user_score["score"]
68
 
69
  if score < THRESHOLD_SCORE:
70
- return f"Your score is {score}. You need at least {THRESHOLD_SCORE} to pass.", None
71
 
72
  if not has_certificate_entry(username):
73
- add_certificate_entry(username, name)
74
 
75
  certificate_image, certificate_pdf = generate_certificate(name, score)
76
  return "Congratulations! Here's your certificate:", certificate_image, certificate_pdf
 
67
  score = user_score["score"]
68
 
69
  if score < THRESHOLD_SCORE:
70
+ return f"Your score is {score}. You need at least {THRESHOLD_SCORE} to pass.", None, None
71
 
72
  if not has_certificate_entry(username):
73
+ return f"It looks like you didn't submit your assignment. Did you follow Unit 4 assignment?", None, None
74
 
75
  certificate_image, certificate_pdf = generate_certificate(name, score)
76
  return "Congratulations! Here's your certificate:", certificate_image, certificate_pdf