Spaces:
Running
Running
capradeepgujaran
commited on
Commit
•
bc2b2dc
1
Parent(s):
418545a
Update app.py
Browse files
app.py
CHANGED
@@ -308,12 +308,7 @@ def create_quiz_interface():
|
|
308 |
outputs=tabs
|
309 |
)
|
310 |
|
311 |
-
|
312 |
-
score_display.change(
|
313 |
-
fn=generate_certificate,
|
314 |
-
inputs=[score_display, name, course_name, company_logo, participant_photo],
|
315 |
-
outputs=[certificate_display, completion_message]
|
316 |
-
)
|
317 |
|
318 |
def generate_certificate(score, name, course_name, company_logo=None, participant_photo=None):
|
319 |
"""
|
@@ -482,14 +477,13 @@ def create_quiz_interface():
|
|
482 |
except Exception as e:
|
483 |
print(f"Error generating certificate: {e}")
|
484 |
return None
|
485 |
-
|
486 |
-
|
487 |
score_display.change(
|
488 |
fn=generate_certificate,
|
489 |
inputs=[score_display, name, course_name, company_logo, participant_photo],
|
490 |
-
outputs=certificate_display
|
491 |
)
|
492 |
-
|
493 |
return demo
|
494 |
|
495 |
if __name__ == "__main__":
|
|
|
308 |
outputs=tabs
|
309 |
)
|
310 |
|
311 |
+
|
|
|
|
|
|
|
|
|
|
|
312 |
|
313 |
def generate_certificate(score, name, course_name, company_logo=None, participant_photo=None):
|
314 |
"""
|
|
|
477 |
except Exception as e:
|
478 |
print(f"Error generating certificate: {e}")
|
479 |
return None
|
480 |
+
|
481 |
+
# Certificate generation event handler
|
482 |
score_display.change(
|
483 |
fn=generate_certificate,
|
484 |
inputs=[score_display, name, course_name, company_logo, participant_photo],
|
485 |
+
outputs=[certificate_display, completion_message]
|
486 |
)
|
|
|
487 |
return demo
|
488 |
|
489 |
if __name__ == "__main__":
|