Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -335,6 +335,9 @@ def validate_update(updated_skills, request: gr.Request):
|
|
335 |
student_id, student_mail = get_id_by_name(student_name)
|
336 |
response = update_student_description(student_id, updated_skills)
|
337 |
return response
|
|
|
|
|
|
|
338 |
|
339 |
with gr.Blocks() as demo:
|
340 |
gr.HTML("""
|
@@ -353,15 +356,8 @@ with gr.Blocks() as demo:
|
|
353 |
skill_assessment_output = gr.Textbox(label="Compétences actuelles", interactive=False) # Sortie des compétences
|
354 |
validate_button = gr.Button("Valider la mise à jour") # Bouton pour valider la mise à jour
|
355 |
validation_output = gr.Textbox(label="Résultat de la mise à jour", interactive=False)
|
356 |
-
|
357 |
-
|
358 |
-
"""<a href="https://albatrossstudent.softr.app" target="_blank">
|
359 |
-
<button style="width: 100%; padding: 10px; background-color: #C4DAFB; color: #3662E3; border: none; border-radius: 5px; font-family: 'Helvetica', sans-serif; font-weight: bold;">
|
360 |
-
💻 Retour au site 💻
|
361 |
-
</button>
|
362 |
-
</a>""",
|
363 |
-
elem_id="voir-offre-button"
|
364 |
-
)
|
365 |
|
366 |
|
367 |
|
|
|
335 |
student_id, student_mail = get_id_by_name(student_name)
|
336 |
response = update_student_description(student_id, updated_skills)
|
337 |
return response
|
338 |
+
|
339 |
+
def redirect_to_url():
|
340 |
+
return gr.update(js="window.open('https://albatrossstudent.softr.app', '_blank')")
|
341 |
|
342 |
with gr.Blocks() as demo:
|
343 |
gr.HTML("""
|
|
|
356 |
skill_assessment_output = gr.Textbox(label="Compétences actuelles", interactive=False) # Sortie des compétences
|
357 |
validate_button = gr.Button("Valider la mise à jour") # Bouton pour valider la mise à jour
|
358 |
validation_output = gr.Textbox(label="Résultat de la mise à jour", interactive=False)
|
359 |
+
btn_redirect = gr.Button("Retour au site")
|
360 |
+
btn_redirect.click(redirect_to_url, None, None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
|
362 |
|
363 |
|