abraham9486937737 commited on
Commit
b11f294
·
1 Parent(s): cb05801

Improve logo path resolution for HF

Browse files
Files changed (1) hide show
  1. streamlit_app/app.py +13 -5
streamlit_app/app.py CHANGED
@@ -241,11 +241,19 @@ def load_kpi_summary():
241
  with st.sidebar:
242
  # Display logo
243
  try:
244
- logo_path = Path(project_root) / "mypace-logo.png"
245
- if logo_path.exists():
246
- from PIL import Image
247
- logo_img = Image.open(logo_path)
248
- st.image(logo_img, use_container_width=True)
 
 
 
 
 
 
 
 
249
  else:
250
  # Fallback to unicode emoji logo
251
  st.markdown("<h1 style='text-align: center; font-size: 80px;'>🏨</h1>", unsafe_allow_html=True)
 
241
  with st.sidebar:
242
  # Display logo
243
  try:
244
+ logo_candidates = [
245
+ Path(project_root) / "mypace-logo.png",
246
+ Path(__file__).parent / "mypace-logo.png",
247
+ Path.cwd() / "mypace-logo.png",
248
+ ]
249
+ logo_path = next((p for p in logo_candidates if p.exists()), None)
250
+ if logo_path:
251
+ try:
252
+ st.image(str(logo_path), use_container_width=True)
253
+ except Exception:
254
+ from PIL import Image
255
+ logo_img = Image.open(logo_path)
256
+ st.image(logo_img, use_container_width=True)
257
  else:
258
  # Fallback to unicode emoji logo
259
  st.markdown("<h1 style='text-align: center; font-size: 80px;'>🏨</h1>", unsafe_allow_html=True)