wseo commited on
Commit
7a64fcf
β€’
1 Parent(s): cb4019a

docs: update congrats message in app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -22
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 Hugging Face Audio Course πŸŽ‰! \n
127
- Since you pass 100% of the hands-on 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 @mariakhalusova 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)
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 Hugging Face Audio Course πŸŽ‰! \n
139
- Since you pass 3 out of 4 of the hands-on 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 @mariakhalusova and @huggingface) πŸ€— \n
142
- You can try to get a Certificate of Excellence if you pass 100% of the hands-on, don't hesitate to check which unit you didn't pass and update these models.
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 3 out of 4 of the hands-on to get a certificate of completion.
151
- For more information about the certification process, refer to Unit 8 of the course. To see what hands-on you still need to complete, use the self-evaluation space linked in the description above.
152
- If the results here differ from your results in the self-evaluation space, make sure that your model's metrics automatically uploaded by Trainer have not been manually altered.
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 Hugging Face Audio Course Certificate πŸŽ“
172
  The certification process is completely free:
173
- - To get a *certificate of completion*: you need to **pass 3 out of 4 hands-on assignments**.
174
- - To get a *certificate of excellence*: you need to **pass 4 out of 4 hands-on assignments**.
175
 
176
- For more information about the certification process [check the course page on certification](https://huggingface.co/learn/audio-course/chapter8/certification).
177
 
178
- To check which assignments you still need to complete, use the [self-evaluation space](https://huggingface.co/spaces/MariaK/Check-my-progress-Audio-Course).
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="MariaK", label="Your Hugging Face Username (case sensitive)")
184
- first_name = gr.Textbox(placeholder="Maria", label="Your First Name")
185
- last_name = gr.Textbox(placeholder="Khalusova", label="Your Last Name")
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()