Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -1
src/streamlit_app.py
CHANGED
|
@@ -61,7 +61,13 @@ for idx, row in filtered_df.iterrows():
|
|
| 61 |
|
| 62 |
with c1:
|
| 63 |
# Load Image
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
if os.path.exists(img_path):
|
| 66 |
img = Image.open(img_path)
|
| 67 |
st.image(img, use_container_width=True, caption=f"Token: {row['token'][:8]}...")
|
|
|
|
| 61 |
|
| 62 |
with c1:
|
| 63 |
# Load Image
|
| 64 |
+
raw_path = row.get("web_image_path", "")
|
| 65 |
+
# Fix path if it doesn't start with the folder name
|
| 66 |
+
if not raw_path.startswith("hf_demo_pack"):
|
| 67 |
+
img_path = os.path.join("hf_demo_pack", raw_path)
|
| 68 |
+
else:
|
| 69 |
+
img_path = raw_path
|
| 70 |
+
|
| 71 |
if os.path.exists(img_path):
|
| 72 |
img = Image.open(img_path)
|
| 73 |
st.image(img, use_container_width=True, caption=f"Token: {row['token'][:8]}...")
|