Show links better
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ def load_leaderboard_data(csv_file_path):
|
|
11 |
try:
|
12 |
df = pd.read_csv(csv_file_path)
|
13 |
# Create hyperlinks in the Model column using HTML <a> tags with inline CSS for styling
|
14 |
-
df['Model'] = df.apply(lambda row: f'<a href="{row["Link"]}" target="_blank" style="color:
|
15 |
# Drop the 'Link' column as it's no longer needed
|
16 |
df.drop(columns=['Link'], inplace=True)
|
17 |
return df
|
|
|
11 |
try:
|
12 |
df = pd.read_csv(csv_file_path)
|
13 |
# Create hyperlinks in the Model column using HTML <a> tags with inline CSS for styling
|
14 |
+
df['Model'] = df.apply(lambda row: f'<a href="{row["Link"]}" target="_blank" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{row["Model"]}</a>' if pd.notna(row["Link"]) else row["Model"], axis=1)
|
15 |
# Drop the 'Link' column as it's no longer needed
|
16 |
df.drop(columns=['Link'], inplace=True)
|
17 |
return df
|