Spaces:
Running
on
Zero
Running
on
Zero
Create utils.py
Browse files
utils.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import os
|
3 |
+
|
4 |
+
|
5 |
+
def load_css():
|
6 |
+
"""Charge le fichier CSS externe"""
|
7 |
+
css_path = os.path.join(os.path.dirname(__file__), "styles.css")
|
8 |
+
try:
|
9 |
+
with open(css_path, "r", encoding="utf-8") as f:
|
10 |
+
return f.read()
|
11 |
+
except FileNotFoundError:
|
12 |
+
logger.warning(f"Fichier CSS non trouvé: {css_path}")
|
13 |
+
return ""
|