forked from enricd/st_llms_arena
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.py
31 lines (26 loc) · 1.35 KB
/
utils.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import streamlit as st
# Function to create a contributor card
def contributor_card(image_url="", name="", role="", linkedin_url="", github_url=""):
"""
Creates a contributor card with profile image, name, role, and LinkedIn profile link.
"""
card = f"""
<div style="border-radius: 10px; padding: 1rem; background-color: #484c63; display: flex; align-items: center; margin-bottom: 0.5rem;">
<img src="{image_url}" alt="Profile picture" style="border-radius: 50%; width: 60px; height: 60px; margin-right: 1rem;">
<div style="line-height: 1;">
<div style="font-weight: bold; margin-bottom: 0.2rem;">{name}</div>
<div style="font-style: italic; font-size: 0.8rem; margin-bottom: 0.2rem;">{role}</div>
<a href="{linkedin_url}" target="_blank" style="font-size: 0.8rem;">LinkedIn</a>
<span style="font-size: 0.8rem; margin: 0 0.3rem;">-</span>
<a href="{github_url}" target="_blank" style="font-size: 0.8rem;">GitHub</a>
</div>
</div>
"""
return card
enric_info = {
"name": "Enric Domingo",
"role": "ML and Software Engineer",
"image_url": "https://avatars.githubusercontent.com/u/6952495?v=4",
"linkedin_url": "https://www.linkedin.com/in/e-domingo/",
"github_url": "https://www.github.com/enricd",
}