Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,21 @@ from PIL import Image, ImageDraw, ImageFont
|
|
| 4 |
import io
|
| 5 |
|
| 6 |
def main():
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
st.sidebar.title("Label Generator")
|
| 9 |
st.sidebar.markdown("For [AI Energy Score Leaderboard](https://huggingface.co/spaces/AIEnergyScore/Leaderboard)")
|
| 10 |
|
|
|
|
| 4 |
import io
|
| 5 |
|
| 6 |
def main():
|
| 7 |
+
# Sidebar logo and title
|
| 8 |
+
with st.sidebar:
|
| 9 |
+
col1, col2 = st.columns([1, 3]) # Adjust column proportions as needed
|
| 10 |
+
|
| 11 |
+
# Display the logo in the first column
|
| 12 |
+
with col1:
|
| 13 |
+
logo = Image.open("logo.png")
|
| 14 |
+
resized_logo = logo.resize((50, 50)) # Resize the logo to 50x50 pixels
|
| 15 |
+
st.image(resized_logo)
|
| 16 |
+
|
| 17 |
+
# Display the text in the second column
|
| 18 |
+
with col2:
|
| 19 |
+
st.markdown("<h2 style='margin-top: 10px;'>AI Energy Score</h2>", unsafe_allow_html=True)
|
| 20 |
+
|
| 21 |
+
# Sidebar instructions and link
|
| 22 |
st.sidebar.title("Label Generator")
|
| 23 |
st.sidebar.markdown("For [AI Energy Score Leaderboard](https://huggingface.co/spaces/AIEnergyScore/Leaderboard)")
|
| 24 |
|