Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +32 -9
src/streamlit_app.py
CHANGED
|
@@ -305,20 +305,43 @@ def run_vortex_system():
|
|
| 305 |
st.warning("Diagnostic : Le module est chargé mais la fonction 'show_terminal' est introuvable.")
|
| 306 |
|
| 307 |
elif menu == "AIP Terminal":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 308 |
# On laisse le module afficher son propre titre (plus propre)
|
| 309 |
-
|
| 310 |
# --- DIAGNOSTIC DE CHARGEMENT ---
|
| 311 |
if not AIP:
|
| 312 |
st.error("❌ Le module AIP (Jasmine Agent) n'est pas chargé.")
|
| 313 |
-
st.info(
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
|
|
|
|
|
|
| 320 |
# Optionnel : afficher la trace si vous avez importé traceback
|
| 321 |
-
if
|
| 322 |
st.code(st.session_state.import_error_aip)
|
| 323 |
|
| 324 |
elif not hasattr(AIP, 'show_terminal'):
|
|
|
|
| 305 |
st.warning("Diagnostic : Le module est chargé mais la fonction 'show_terminal' est introuvable.")
|
| 306 |
|
| 307 |
elif menu == "AIP Terminal":
|
| 308 |
+
# CSS personnalisé pour un design rectangulaire et sombre
|
| 309 |
+
st.markdown(
|
| 310 |
+
"""
|
| 311 |
+
<style>
|
| 312 |
+
.stAlert {
|
| 313 |
+
border-radius: 0px !important;
|
| 314 |
+
box-shadow: none !important;
|
| 315 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 316 |
+
}
|
| 317 |
+
.stError, .stInfo {
|
| 318 |
+
background-color: rgba(40, 44, 52, 0.8) !important; /* Couleur de fond sombre */
|
| 319 |
+
color: #ffffff !important; /* Texte blanc */
|
| 320 |
+
}
|
| 321 |
+
.stError p, .stInfo p {
|
| 322 |
+
color: #ffffff !important; /* Texte blanc pour le contenu */
|
| 323 |
+
}
|
| 324 |
+
</style>
|
| 325 |
+
""",
|
| 326 |
+
unsafe_allow_html=True,
|
| 327 |
+
)
|
| 328 |
+
|
| 329 |
# On laisse le module afficher son propre titre (plus propre)
|
| 330 |
+
|
| 331 |
# --- DIAGNOSTIC DE CHARGEMENT ---
|
| 332 |
if not AIP:
|
| 333 |
st.error("❌ Le module AIP (Jasmine Agent) n'est pas chargé.")
|
| 334 |
+
st.info(
|
| 335 |
+
"""
|
| 336 |
+
**Causes possibles :**
|
| 337 |
+
1. Erreur d'import dans `streamlit_app.py` (vérifiez le nom du dossier `module`).
|
| 338 |
+
2. Bibliothèques manquantes dans `AIP.py` (ex: `google-generativeai` ou `groq`).
|
| 339 |
+
3. Erreur de chemin vers le dossier `Function`.
|
| 340 |
+
"""
|
| 341 |
+
)
|
| 342 |
+
|
| 343 |
# Optionnel : afficher la trace si vous avez importé traceback
|
| 344 |
+
if "import_error_aip" in st.session_state:
|
| 345 |
st.code(st.session_state.import_error_aip)
|
| 346 |
|
| 347 |
elif not hasattr(AIP, 'show_terminal'):
|