Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -155,9 +155,9 @@ def interface():
|
|
155 |
with gr.Blocks(css=".gr-dropdown { max-height: 100px; overflow-y: auto; font-size: 12px; }") as demo:
|
156 |
gr.Markdown("""
|
157 |
# π LeRobot Worldwide Hackathon - Team-Up Dashboard
|
158 |
-
|
159 |
Welcome to the Team-Up dashboard! Follow these steps:
|
160 |
-
|
161 |
1. **Submit or update** your profile to help others find and contact you via Discord. Required fields are marked with `*`.
|
162 |
2. **Use the filters** (country, city, language) to search for teammates from around the world.
|
163 |
""")
|
@@ -209,14 +209,15 @@ def interface():
|
|
209 |
next_btn.click(lambda p: p + 1, inputs=[page_state], outputs=[page_state])
|
210 |
next_btn.click(filter_by_fields, inputs=[country_filter, city_filter, language_filter, page_state], outputs=[table_html, page_state, gr.Number(visible=False)])
|
211 |
|
212 |
-
gr.
|
213 |
admin_discord = gr.Text(label="Discord Username")
|
214 |
admin_code = gr.Text(label="Admin Code", type="password")
|
215 |
-
del_btn = gr.Button("Delete Profile")
|
216 |
del_status = gr.Textbox(label="Status", interactive=False)
|
217 |
del_btn.click(delete_by_discord, inputs=[admin_discord, admin_code], outputs=[del_status])
|
|
|
|
|
218 |
|
219 |
-
gr.Markdown("---\n###
|
220 |
export_code = gr.Text(label="Admin Code", type="password")
|
221 |
download_btn = gr.Button("Generate and Download CSV")
|
222 |
download_file = gr.File(label="CSV Export", interactive=False)
|
@@ -226,4 +227,3 @@ def interface():
|
|
226 |
|
227 |
demo = interface()
|
228 |
demo.launch()
|
229 |
-
|
|
|
155 |
with gr.Blocks(css=".gr-dropdown { max-height: 100px; overflow-y: auto; font-size: 12px; }") as demo:
|
156 |
gr.Markdown("""
|
157 |
# π LeRobot Worldwide Hackathon - Team-Up Dashboard
|
158 |
+
|
159 |
Welcome to the Team-Up dashboard! Follow these steps:
|
160 |
+
|
161 |
1. **Submit or update** your profile to help others find and contact you via Discord. Required fields are marked with `*`.
|
162 |
2. **Use the filters** (country, city, language) to search for teammates from around the world.
|
163 |
""")
|
|
|
209 |
next_btn.click(lambda p: p + 1, inputs=[page_state], outputs=[page_state])
|
210 |
next_btn.click(filter_by_fields, inputs=[country_filter, city_filter, language_filter, page_state], outputs=[table_html, page_state, gr.Number(visible=False)])
|
211 |
|
212 |
+
del_btn = gr.Button("Delete Profile")
|
213 |
admin_discord = gr.Text(label="Discord Username")
|
214 |
admin_code = gr.Text(label="Admin Code", type="password")
|
|
|
215 |
del_status = gr.Textbox(label="Status", interactive=False)
|
216 |
del_btn.click(delete_by_discord, inputs=[admin_discord, admin_code], outputs=[del_status])
|
217 |
+
del_btn.click(lambda: 1, outputs=[page_state])
|
218 |
+
del_btn.click(filter_by_fields, inputs=[country_filter, city_filter, language_filter, gr.State(1)], outputs=[table_html, page_state, gr.Number(visible=False)])
|
219 |
|
220 |
+
gr.Markdown("---\n### π
Admin Export CSV")
|
221 |
export_code = gr.Text(label="Admin Code", type="password")
|
222 |
download_btn = gr.Button("Generate and Download CSV")
|
223 |
download_file = gr.File(label="CSV Export", interactive=False)
|
|
|
227 |
|
228 |
demo = interface()
|
229 |
demo.launch()
|
|