import streamlit as st import base64 from pathlib import Path def _img_to_base64(path: str) -> str: """로컬 이미지 파일을 base64 문자열로 변환""" with open(path, "rb") as f: return base64.b64encode(f.read()).decode() def show_loading( logo_path: str = "assets/team_icon.png", size: int = 120, height_vh: int = 60, speed: float = 1.2, ): """ 회전하는 로딩 로고 표시 Returns ------- placeholder : st.empty() loading.empty()로 제거 가능 """ # 경로 안정화 (pages/에서도 동일하게 동작) logo_path = Path(logo_path).as_posix() logo_base64 = _img_to_base64(logo_path) placeholder = st.empty() placeholder.markdown( f"""