Spaces:
Sleeping
Sleeping
fix: image path
Browse files- src/whale_gallery.py +5 -2
src/whale_gallery.py
CHANGED
@@ -2,7 +2,7 @@ from itertools import cycle
|
|
2 |
import streamlit as st
|
3 |
|
4 |
import whale_viewer as sw_wv
|
5 |
-
|
6 |
|
7 |
def render_whale_gallery(n_cols:int = 4) -> None:
|
8 |
"""
|
@@ -65,7 +65,10 @@ def render_whale_gallery(n_cols:int = 4) -> None:
|
|
65 |
img_name = sw_wv.df_whale_img_ref.iloc[ix].loc["WHALE_IMAGES"]
|
66 |
whale_name = _format_whale_name(str(sw_wv.df_whale_img_ref.iloc[ix].name))
|
67 |
url = sw_wv.df_whale_img_ref.iloc[ix].loc['WHALE_REFERENCES']
|
68 |
-
|
|
|
|
|
|
|
69 |
#next(cols).image(image_path, width=150, caption=f"{whale_name}")
|
70 |
thing = next(cols)
|
71 |
with thing:
|
|
|
2 |
import streamlit as st
|
3 |
|
4 |
import whale_viewer as sw_wv
|
5 |
+
import os
|
6 |
|
7 |
def render_whale_gallery(n_cols:int = 4) -> None:
|
8 |
"""
|
|
|
65 |
img_name = sw_wv.df_whale_img_ref.iloc[ix].loc["WHALE_IMAGES"]
|
66 |
whale_name = _format_whale_name(str(sw_wv.df_whale_img_ref.iloc[ix].name))
|
67 |
url = sw_wv.df_whale_img_ref.iloc[ix].loc['WHALE_REFERENCES']
|
68 |
+
# Define image paths
|
69 |
+
current_dir = os.getcwd()
|
70 |
+
image_path = os.path.join(current_dir, "images/references/", img_name)
|
71 |
+
#image_path = f"images/references/{img_name}"
|
72 |
#next(cols).image(image_path, width=150, caption=f"{whale_name}")
|
73 |
thing = next(cols)
|
74 |
with thing:
|