Update app.py
Browse files
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 |
-
|
| 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
|