Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -585,7 +585,11 @@ def side():
|
|
| 585 |
st.image("Trust Logic_Wheel_RGB_Standard.png")
|
| 586 |
|
| 587 |
|
| 588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 589 |
|
| 590 |
# Image paths and labels
|
| 591 |
image_files = [
|
|
@@ -634,12 +638,6 @@ def side():
|
|
| 634 |
""",
|
| 635 |
unsafe_allow_html=True,
|
| 636 |
)
|
| 637 |
-
# Function to convert an image to base64
|
| 638 |
-
def image_to_base64(img):
|
| 639 |
-
from io import BytesIO
|
| 640 |
-
buffer = BytesIO()
|
| 641 |
-
img.save(buffer, format="PNG")
|
| 642 |
-
return buffer.getvalue().encode("base64").decode()
|
| 643 |
|
| 644 |
# Create HTML structure for images and hover text
|
| 645 |
image_html = '<div class="image-container">'
|
|
@@ -657,10 +655,8 @@ def side():
|
|
| 657 |
</div>
|
| 658 |
"""
|
| 659 |
image_html += '</div>'
|
| 660 |
-
|
| 661 |
-
# Display images in the Streamlit app
|
| 662 |
st.markdown(image_html, unsafe_allow_html=True)
|
| 663 |
-
|
| 664 |
|
| 665 |
|
| 666 |
|
|
|
|
| 585 |
st.image("Trust Logic_Wheel_RGB_Standard.png")
|
| 586 |
|
| 587 |
|
| 588 |
+
def image_to_base64(img):
|
| 589 |
+
buffer = BytesIO()
|
| 590 |
+
img.save(buffer, format="PNG")
|
| 591 |
+
img_data = buffer.getvalue() # Get the bytes from the image buffer
|
| 592 |
+
return base64.b64encode(img_data).decode()
|
| 593 |
|
| 594 |
# Image paths and labels
|
| 595 |
image_files = [
|
|
|
|
| 638 |
""",
|
| 639 |
unsafe_allow_html=True,
|
| 640 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 641 |
|
| 642 |
# Create HTML structure for images and hover text
|
| 643 |
image_html = '<div class="image-container">'
|
|
|
|
| 655 |
</div>
|
| 656 |
"""
|
| 657 |
image_html += '</div>'
|
|
|
|
|
|
|
| 658 |
st.markdown(image_html, unsafe_allow_html=True)
|
| 659 |
+
|
| 660 |
|
| 661 |
|
| 662 |
|