maringetxway commited on
Commit
f6ed65a
·
verified ·
1 Parent(s): 01b3760

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -12
app.py CHANGED
@@ -142,25 +142,26 @@ def filter_by_fields(selected_country, selected_city, selected_language):
142
  return "<p>No participants match your filters.</p>"
143
 
144
  html = "<table style='width:100%; border-collapse: collapse;'>"
145
- # Header row
146
- html += "<tr>"
147
- for col in df.columns:
148
- html += f"<th style='border: 1px solid #ccc; padding: 6px;'>{col}</th>"
149
- html += "</tr>"
150
-
151
- # Data rows
152
- for _, row in df.iterrows():
153
  html += "<tr>"
154
  for col in df.columns:
155
- val = row[col]
156
- if col == "Discord":
157
- val = f"<a href='https://discord.com/users/{val}' target='_blank'>{val}</a>"
158
- html += f"<td style='border: 1px solid #eee; padding: 6px;'>{val}</td>"
159
  html += "</tr>"
160
 
 
 
 
 
 
 
 
 
 
161
 
162
  return html
163
 
 
164
  # Gradio Interface
165
  with gr.Blocks(css=".gr-dropdown { max-height: 100px; overflow-y: auto; font-size: 12px; }") as demo:
166
  gr.Markdown("# 🌍 LeRobot Hackathon: Global Team-Up Dashboard")
 
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>"
148
  for col in df.columns:
149
+ html += f"<th style='border: 1px solid #ccc; padding: 6px;'>{col}</th>"
 
 
 
150
  html += "</tr>"
151
 
152
+ # Data rows
153
+ for _, row in df.iterrows():
154
+ html += "<tr>"
155
+ for col in df.columns:
156
+ val = row[col]
157
+ if col == "Discord":
158
+ val = f"<a href='https://discord.com/users/{val}' target='_blank'>{val}</a>"
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")