maringetxway commited on
Commit
26bec7a
Β·
verified Β·
1 Parent(s): 1a93595

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -70,12 +70,12 @@ def submit_profile(name, discord, city, country, address, looking, onlinecheck,
70
  "Country": country,
71
  "Address": address,
72
  "Looking for Team": looking,
73
- "Onlinecheck": onlinecheck,
74
  "Languages": languages,
75
  "Laptop": laptop,
76
  "Robot": robot,
77
  "Skills": skills,
78
- "Describe3": describe3,
79
  "Experience": experience,
80
  "Project Idea": idea
81
  })
@@ -141,7 +141,8 @@ def filter_by_fields(selected_country, selected_city, selected_language):
141
  if df.empty:
142
  return "<p>No participants match your filters.</p>"
143
 
144
- html = "<table style='width:100%; border-collapse: collapse;'>"
 
145
 
146
  # Header row
147
  html += "<tr>"
@@ -159,19 +160,21 @@ def filter_by_fields(selected_country, selected_city, selected_language):
159
  html += f"<td style='border: 1px solid #eee; padding: 6px;'>{val}</td>"
160
  html += "</tr>"
161
 
 
162
  return html
163
 
164
 
165
  # Gradio Interface
166
  with gr.Blocks(css=".gr-dropdown { max-height: 100px; overflow-y: auto; font-size: 12px; }") as demo:
167
- gr.Markdown("# 🌍 LeRobot Hackathon: Global Team-Up Dashboard")
 
168
 
169
  with gr.Row():
170
  with gr.Column():
171
  name = gr.Text(label="Name")
172
  discord = gr.Text(label="πŸ‘€ Discord Username *")
173
  city = gr.Text(label="πŸ“ City *")
174
- country = gr.Dropdown(label="🌍 Country *", choices=ALL_COUNTRIES)
175
  address = gr.Text(label="Address (optional)")
176
  looking = gr.Radio(["Yes", "No"], label="πŸ” Looking for a team?")
177
  onlinecheck = gr.Radio(["Participate Online", "Join a Local Hackathon"], label="πŸš€ I will...")
@@ -186,11 +189,11 @@ with gr.Blocks(css=".gr-dropdown { max-height: 100px; overflow-y: auto; font-siz
186
  status = gr.Textbox(label="", interactive=False)
187
 
188
  with gr.Column():
189
- gr.Markdown("🎯 Find teammates by country, city, or language.")
190
  country_filter = gr.Dropdown(label="Filter by Country", choices=["All"] + ALL_COUNTRIES, value="All")
191
  city_filter = gr.Dropdown(label="Filter by City", choices=["All"], value="All")
192
  language_filter = gr.Dropdown(label="Filter by Language", choices=["All", "English", "French", "Spanish", "German", "Portuguese", "Chinese", "Arabic", "Hindi"], value="All")
193
- table_html = gr.HTML()
194
 
195
  submit_btn.click(
196
  fn=submit_profile,
 
70
  "Country": country,
71
  "Address": address,
72
  "Looking for Team": looking,
73
+ "How?": onlinecheck,
74
  "Languages": languages,
75
  "Laptop": laptop,
76
  "Robot": robot,
77
  "Skills": skills,
78
+ "Description": describe3,
79
  "Experience": experience,
80
  "Project Idea": idea
81
  })
 
141
  if df.empty:
142
  return "<p>No participants match your filters.</p>"
143
 
144
+ html = '<h3 style="margin-top:20px;">πŸ” Find your matching Teammates & Register your team <a href="https://forms.gle/gJEMGD4CEA2emhD18" target="_blank">here</a>πŸ‘ˆπŸ‘ˆ</h3>'
145
+ html += "<table style='width:100%; border-collapse: collapse;'>"
146
 
147
  # Header row
148
  html += "<tr>"
 
160
  html += f"<td style='border: 1px solid #eee; padding: 6px;'>{val}</td>"
161
  html += "</tr>"
162
 
163
+ html += "</table>"
164
  return html
165
 
166
 
167
  # Gradio Interface
168
  with gr.Blocks(css=".gr-dropdown { max-height: 100px; overflow-y: auto; font-size: 12px; }") as demo:
169
+ gr.Markdown("# 🌍 LeRobot Worldwide Hackathon - Team-Up Dashboard")
170
+ gr.Markdown("1. Submit or update your profile to find matching teammates and contact them on Discord. (Required fields marked with *.) ")
171
 
172
  with gr.Row():
173
  with gr.Column():
174
  name = gr.Text(label="Name")
175
  discord = gr.Text(label="πŸ‘€ Discord Username *")
176
  city = gr.Text(label="πŸ“ City *")
177
+ country = gr.Dropdown(label="🌍 Country *", choices=ALL_COUNTRIES, value="France")
178
  address = gr.Text(label="Address (optional)")
179
  looking = gr.Radio(["Yes", "No"], label="πŸ” Looking for a team?")
180
  onlinecheck = gr.Radio(["Participate Online", "Join a Local Hackathon"], label="πŸš€ I will...")
 
189
  status = gr.Textbox(label="", interactive=False)
190
 
191
  with gr.Column():
192
+ gr.Markdown("🎯 2. Choose your preferences to find your teammates (country, city or language)")
193
  country_filter = gr.Dropdown(label="Filter by Country", choices=["All"] + ALL_COUNTRIES, value="All")
194
  city_filter = gr.Dropdown(label="Filter by City", choices=["All"], value="All")
195
  language_filter = gr.Dropdown(label="Filter by Language", choices=["All", "English", "French", "Spanish", "German", "Portuguese", "Chinese", "Arabic", "Hindi"], value="All")
196
+ table_html = gr.HTML(label="Matching Participants")
197
 
198
  submit_btn.click(
199
  fn=submit_profile,