Spaces:
Sleeping
Sleeping
Commit ·
73c2d5d
1
Parent(s): a0ccd53
changement dachboard pour chemin api
Browse files- .coverage +0 -0
- dashboard/dshbd.py +9 -10
.coverage
CHANGED
|
Binary files a/.coverage and b/.coverage differ
|
|
|
dashboard/dshbd.py
CHANGED
|
@@ -11,16 +11,15 @@ load_dotenv(find_dotenv())
|
|
| 11 |
|
| 12 |
st.set_page_config(page_title="TechNova Dashboard", layout="centered")
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
#
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
API_ROOT = f"{API_BASE}/api/"
|
| 24 |
|
| 25 |
# API key (le dashboard est un client HTTP, il envoie seulement le header)
|
| 26 |
API_KEY = os.getenv("API_KEY")
|
|
|
|
| 11 |
|
| 12 |
st.set_page_config(page_title="TechNova Dashboard", layout="centered")
|
| 13 |
|
| 14 |
+
API_BASE = os.getenv("API_BASE", "").rstrip("/") # "" sur HF, "http://127.0.0.1:8000" en local
|
| 15 |
+
|
| 16 |
+
# Si API_BASE est vide => on passe par nginx => /api/...
|
| 17 |
+
API_PREFIX = "/api" if API_BASE == "" else ""
|
| 18 |
+
|
| 19 |
+
API_PREDICT_BY_ID = f"{API_BASE}{API_PREFIX}/predict/by-id"
|
| 20 |
+
API_PREDICT_DEBUG = f"{API_BASE}{API_PREFIX}/predict/debug"
|
| 21 |
+
API_LATEST = f"{API_BASE}{API_PREFIX}/predictions/latest"
|
| 22 |
+
API_ROOT = f"{API_BASE}{API_PREFIX}/"
|
|
|
|
| 23 |
|
| 24 |
# API key (le dashboard est un client HTTP, il envoie seulement le header)
|
| 25 |
API_KEY = os.getenv("API_KEY")
|