docs: update congrats message in app.py
Browse files
app.py
CHANGED
|
@@ -118,28 +118,28 @@ def create_certificate(passed, certificate_type, hf_username, first_name, last_n
|
|
| 118 |
|
| 119 |
if passed and certificate_type == "excellence":
|
| 120 |
# Generate a certificate of
|
| 121 |
-
certificate, pdf = generate_certificate("./certificate-excellence.png", first_name, last_name)
|
| 122 |
# Add this user to our database
|
| 123 |
add_certified_user(hf_username, first_name, last_name, certificate_type)
|
| 124 |
# Add a message
|
| 125 |
message = """
|
| 126 |
-
Congratulations, you successfully completed the
|
| 127 |
-
Since you
|
| 128 |
You can download your certificate below β¬οΈ \n
|
| 129 |
-
Don't hesitate to share your certificate image below on Twitter and Linkedin (you can tag me @
|
| 130 |
"""
|
| 131 |
elif passed and certificate_type == "completion":
|
| 132 |
# Generate a certificate of completion
|
| 133 |
-
certificate, pdf = generate_certificate("./certificate-completion.png", first_name, last_name)
|
| 134 |
# Add this user to our database
|
| 135 |
add_certified_user(hf_username, first_name, last_name, certificate_type)
|
| 136 |
# Add a message
|
| 137 |
message = """
|
| 138 |
-
Congratulations, you successfully completed the
|
| 139 |
-
Since you
|
| 140 |
You can download your certificate below β¬οΈ \n
|
| 141 |
-
Don't hesitate to share your certificate image below on Twitter and Linkedin (you can tag me @
|
| 142 |
-
You can try to get a Certificate of Excellence if you
|
| 143 |
"""
|
| 144 |
else:
|
| 145 |
# Not passed yet
|
|
@@ -147,9 +147,9 @@ def create_certificate(passed, certificate_type, hf_username, first_name, last_n
|
|
| 147 |
pdf = "./fail.pdf"
|
| 148 |
# Add a message
|
| 149 |
message = """
|
| 150 |
-
You didn't pass the minimum of
|
| 151 |
-
For more information about the certification process, refer to
|
| 152 |
-
If the results here differ from your
|
| 153 |
"""
|
| 154 |
return certificate, message, pdf
|
| 155 |
|
|
@@ -168,21 +168,19 @@ def certification(hf_username, first_name, last_name):
|
|
| 168 |
|
| 169 |
with gr.Blocks() as demo:
|
| 170 |
gr.Markdown(f"""
|
| 171 |
-
# Get your
|
| 172 |
The certification process is completely free:
|
| 173 |
-
- To get a *certificate of completion*: you need to **
|
| 174 |
-
- To get a *certificate of excellence*: you need to **
|
| 175 |
|
| 176 |
-
For more information about the certification process [check the
|
| 177 |
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
Don't hesitate to share your certificate on Twitter (tag me [@mariakhalusova](https://twitter.com/mariaKhalusova) and [@huggingface](https://twitter.com/huggingface)) and on LinkedIn.
|
| 181 |
""")
|
| 182 |
|
| 183 |
-
hf_username = gr.Textbox(placeholder="
|
| 184 |
-
first_name = gr.Textbox(placeholder="
|
| 185 |
-
last_name = gr.Textbox(placeholder="
|
| 186 |
|
| 187 |
check_progress_button = gr.Button(value="Check if I pass and get the certificate")
|
| 188 |
output_text = gr.components.Textbox()
|
|
|
|
| 118 |
|
| 119 |
if passed and certificate_type == "excellence":
|
| 120 |
# Generate a certificate of
|
| 121 |
+
certificate, pdf = generate_certificate("./certificate-excellence.png", first_name, last_name, hf_username)
|
| 122 |
# Add this user to our database
|
| 123 |
add_certified_user(hf_username, first_name, last_name, certificate_type)
|
| 124 |
# Add a message
|
| 125 |
message = """
|
| 126 |
+
Congratulations, you successfully completed the 2023 Hackathon π! \n
|
| 127 |
+
Since you contributed to models, datasets, and spaces- you get a Certificate of Excellence π. \n
|
| 128 |
You can download your certificate below β¬οΈ \n
|
| 129 |
+
Don't hesitate to share your certificate image below on Twitter and Linkedin (you can tag me @wonhseo, @pseudolab and @huggingface) π€
|
| 130 |
"""
|
| 131 |
elif passed and certificate_type == "completion":
|
| 132 |
# Generate a certificate of completion
|
| 133 |
+
certificate, pdf = generate_certificate("./certificate-completion.png", first_name, last_name, hf_username)
|
| 134 |
# Add this user to our database
|
| 135 |
add_certified_user(hf_username, first_name, last_name, certificate_type)
|
| 136 |
# Add a message
|
| 137 |
message = """
|
| 138 |
+
Congratulations, you successfully completed the 2023 Hackathon π! \n
|
| 139 |
+
Since you contributed to at least one model, dataset, or space- you get a Certificate of Completion π. \n
|
| 140 |
You can download your certificate below β¬οΈ \n
|
| 141 |
+
Don't hesitate to share your certificate image below on Twitter and Linkedin (you can tag me @wonhseo, @pseudolab and @huggingface) π€ \n
|
| 142 |
+
You can try to get a Certificate of Excellence if you contribute to all types of repos, please don't hesitate to do so.
|
| 143 |
"""
|
| 144 |
else:
|
| 145 |
# Not passed yet
|
|
|
|
| 147 |
pdf = "./fail.pdf"
|
| 148 |
# Add a message
|
| 149 |
message = """
|
| 150 |
+
You didn't pass the minimum of one contribution to get a certificate of completion.
|
| 151 |
+
For more information about the certification process, refer to the hackathon page.
|
| 152 |
+
If the results here differ from your contributions, make sure you moved your space to the pseudolab organization.
|
| 153 |
"""
|
| 154 |
return certificate, message, pdf
|
| 155 |
|
|
|
|
| 168 |
|
| 169 |
with gr.Blocks() as demo:
|
| 170 |
gr.Markdown(f"""
|
| 171 |
+
# Get your 2023 Hackathon Certificate π
|
| 172 |
The certification process is completely free:
|
| 173 |
+
- To get a *certificate of completion*: you need to **contribute to at least one model, dataset, or space**.
|
| 174 |
+
- To get a *certificate of excellence*: you need to **contribute to models, datasets, and spaces**. *(Yes, all three!)*
|
| 175 |
|
| 176 |
+
For more information about the certification process [check the hackathon page on certification](https://pseudo-lab.github.io/huggingface-hackathon23/submit.html#certification).
|
| 177 |
|
| 178 |
+
Don't hesitate to share your certificate on Twitter (tag me [@wonhseo](https://twitter.com/wonhseo), [@pseudolab](https://twitter.com/pseudolab), and [@huggingface](https://twitter.com/huggingface)) and on LinkedIn.
|
|
|
|
|
|
|
| 179 |
""")
|
| 180 |
|
| 181 |
+
hf_username = gr.Textbox(placeholder="wseo", label="Your Hugging Face Username (case sensitive)")
|
| 182 |
+
first_name = gr.Textbox(placeholder="Wonhyeong", label="Your First Name")
|
| 183 |
+
last_name = gr.Textbox(placeholder="Seo", label="Your Last Name")
|
| 184 |
|
| 185 |
check_progress_button = gr.Button(value="Check if I pass and get the certificate")
|
| 186 |
output_text = gr.components.Textbox()
|