Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
from PIL import Image
|
| 4 |
-
|
| 5 |
-
|
| 6 |
|
| 7 |
# Set up page config
|
| 8 |
st.set_page_config(
|
|
@@ -76,33 +76,33 @@ st.markdown(
|
|
| 76 |
|
| 77 |
# Display title and description
|
| 78 |
st.markdown('<div class="container">', unsafe_allow_html=True)
|
| 79 |
-
st.image(logo_image, output_format="PNG", width=200)
|
| 80 |
|
| 81 |
# Convert the image to base64
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
st.markdown('<div class="description">Benchmark for LM Factuality Evaluation</div>',
|
| 107 |
unsafe_allow_html=True)
|
| 108 |
st.markdown('</div>', unsafe_allow_html=True)
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
from PIL import Image
|
| 4 |
+
import base64
|
| 5 |
+
from io import BytesIO
|
| 6 |
|
| 7 |
# Set up page config
|
| 8 |
st.set_page_config(
|
|
|
|
| 76 |
|
| 77 |
# Display title and description
|
| 78 |
st.markdown('<div class="container">', unsafe_allow_html=True)
|
| 79 |
+
# st.image(logo_image, output_format="PNG", width=200)
|
| 80 |
|
| 81 |
# Convert the image to base64
|
| 82 |
+
buffered = BytesIO()
|
| 83 |
+
logo_image.save(buffered, format="PNG")
|
| 84 |
+
img_data = base64.b64encode(buffered.getvalue()).decode("utf-8")
|
| 85 |
+
st.markdown(
|
| 86 |
+
f"""
|
| 87 |
+
<style>
|
| 88 |
+
.logo-container {{
|
| 89 |
+
display: flex;
|
| 90 |
+
justify-content: flex-start; /* Aligns to the left */
|
| 91 |
+
}}
|
| 92 |
+
.logo-container img {{
|
| 93 |
+
width: 50%; /* Adjust this to control the width, e.g., 50% of container width */
|
| 94 |
+
max-width: 300px; /* Set a maximum width */
|
| 95 |
+
background-color: transparent;
|
| 96 |
+
}}
|
| 97 |
+
</style>
|
| 98 |
+
<div class="logo-container">
|
| 99 |
+
<img src="data:image/png;base64,{img_data}" alt="FactBench Leaderboard Logo">
|
| 100 |
+
</div>
|
| 101 |
+
""",
|
| 102 |
+
unsafe_allow_html=True
|
| 103 |
+
)
|
| 104 |
+
st.markdown('<div class="title">FactBench Leaderboard</div>',
|
| 105 |
+
unsafe_allow_html=True)
|
| 106 |
st.markdown('<div class="description">Benchmark for LM Factuality Evaluation</div>',
|
| 107 |
unsafe_allow_html=True)
|
| 108 |
st.markdown('</div>', unsafe_allow_html=True)
|