Update app.py
Browse files
app.py
CHANGED
@@ -142,13 +142,20 @@ 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 |
-
html += "<tr>"
|
|
|
|
|
|
|
|
|
146 |
for _, row in df.iterrows():
|
147 |
-
html += "<tr>"
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
|
|
|
|
|
|
152 |
return html
|
153 |
|
154 |
# Gradio Interface
|
|
|
142 |
return "<p>No participants match your filters.</p>"
|
143 |
|
144 |
html = "<table style='width:100%; border-collapse: collapse;'>"
|
145 |
+
html += "<tr>"
|
146 |
+
for col in df.columns:
|
147 |
+
html += f"<th style='border: 1px solid #ccc; padding: 6px;'>{col}</th>"
|
148 |
+
html += "</tr>"
|
149 |
+
|
150 |
for _, row in df.iterrows():
|
151 |
+
html += "<tr>"
|
152 |
+
for col in df.columns:
|
153 |
+
val = row[col]
|
154 |
+
if col == "Discord":
|
155 |
+
val = f"<a href='https://discord.com/users/{val}' target='_blank'>{val}</a>"
|
156 |
+
html += f"<td style='border: 1px solid #eee; padding: 6px;'>{val}</td>"
|
157 |
+
html += "</tr>"
|
158 |
+
|
159 |
return html
|
160 |
|
161 |
# Gradio Interface
|