Spaces:
Runtime error
Runtime error
Download src/streamlit/utils/ui_utils.py from digitaljof/Projet-Rakuten-Titan: direct link, hf CLI and curl.
- Browser
- Download file 456 Bytes
-
https://huggingface.co/spaces/digitaljof/Projet-Rakuten-Titan/resolve/main/src/streamlit/utils/ui_utils.py
- Command line
-
hf download hf://spaces/digitaljof/Projet-Rakuten-Titan/src/streamlit/utils/ui_utils.py
-
curl -L -o ui_utils.py https://huggingface.co/spaces/digitaljof/Projet-Rakuten-Titan/resolve/main/src/streamlit/utils/ui_utils.py
456 Bytes
| """ | |
| Utilitaires UI pour l'application Streamlit Rakuten. | |
| """ | |
| import streamlit as st | |
| from pathlib import Path | |
| def load_css(css_file_path: Path): | |
| """Charge un fichier CSS et l'injecte dans la page Streamlit.""" | |
| try: | |
| with open(css_file_path, "r", encoding="utf-8") as f: | |
| st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True) | |
| except FileNotFoundError: | |
| st.error(f"Fichier CSS non trouvé : {css_file_path}") | |