Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
eb93166
1
Parent(s):
9b30d93
Add layout visibility
Browse files
app.py
CHANGED
|
@@ -257,6 +257,8 @@ def certification(hf_username, first_name, last_name):
|
|
| 257 |
certificate, message, pdf = verify_certification(results_certification, hf_username, first_name, last_name)
|
| 258 |
print("MESSAGE", message)
|
| 259 |
|
|
|
|
|
|
|
| 260 |
return message, pdf, certificate, df
|
| 261 |
|
| 262 |
"""
|
|
@@ -374,7 +376,7 @@ def add_certified_user(hf_username, first_name, last_name, pass_percentage):
|
|
| 374 |
|
| 375 |
with gr.Blocks() as demo:
|
| 376 |
gr.Markdown(f"""
|
| 377 |
-
# Get your
|
| 378 |
The certification process is completely free:
|
| 379 |
|
| 380 |
- To get a *certificate of completion*: you need to **pass 80% of the assignments before the end of April 2023**.
|
|
@@ -390,11 +392,11 @@ with gr.Blocks() as demo:
|
|
| 390 |
last_name = gr.Textbox(placeholder="Doe", label="Your Last Name")
|
| 391 |
#email = gr.Textbox(placeholder="jane.doe@gmail.com", label="Your Email (to receive your certificate)")
|
| 392 |
check_progress_button = gr.Button(value="Check if I pass")
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
| 398 |
check_progress_button.click(fn=certification, inputs=[hf_username, first_name, last_name], outputs=[output_text, output_pdf, output_img, output_dataframe])#[output1, output2])
|
| 399 |
|
| 400 |
|
|
|
|
| 257 |
certificate, message, pdf = verify_certification(results_certification, hf_username, first_name, last_name)
|
| 258 |
print("MESSAGE", message)
|
| 259 |
|
| 260 |
+
output_row: gr.update(visible=True)
|
| 261 |
+
|
| 262 |
return message, pdf, certificate, df
|
| 263 |
|
| 264 |
"""
|
|
|
|
| 376 |
|
| 377 |
with gr.Blocks() as demo:
|
| 378 |
gr.Markdown(f"""
|
| 379 |
+
# Get your Deep Reinforcement Learning Certificate 🎓
|
| 380 |
The certification process is completely free:
|
| 381 |
|
| 382 |
- To get a *certificate of completion*: you need to **pass 80% of the assignments before the end of April 2023**.
|
|
|
|
| 392 |
last_name = gr.Textbox(placeholder="Doe", label="Your Last Name")
|
| 393 |
#email = gr.Textbox(placeholder="jane.doe@gmail.com", label="Your Email (to receive your certificate)")
|
| 394 |
check_progress_button = gr.Button(value="Check if I pass")
|
| 395 |
+
with gr.Row(visible=False) as output_row:
|
| 396 |
+
output_text = gr.components.Textbox()
|
| 397 |
+
output_pdf = gr.File()
|
| 398 |
+
output_img = gr.components.Image(type="pil")
|
| 399 |
+
output_dataframe = gr.components.Dataframe(headers=["Pass?", "Unit", "Environment", "Baseline", "Your best result", "Your best model id"], datatype=["markdown", "markdown", "markdown", "number", "number", "markdown", "bool"]) #value= certification(hf_username, first_name, last_name),
|
| 400 |
check_progress_button.click(fn=certification, inputs=[hf_username, first_name, last_name], outputs=[output_text, output_pdf, output_img, output_dataframe])#[output1, output2])
|
| 401 |
|
| 402 |
|