Spaces:
Running
Running
Déploiement automatique depuis GitLab CI
Browse files- MistralChat.py +17 -28
MistralChat.py
CHANGED
|
@@ -261,29 +261,23 @@ html, body, [data-testid="stAppViewContainer"] {
|
|
| 261 |
}
|
| 262 |
@media (max-width: 480px) { .hero-badge { display: none; } }
|
| 263 |
|
| 264 |
-
/* ── Chips de suggestion de question ── */
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
font-weight: 500;
|
| 277 |
-
padding: 6px 12px;
|
| 278 |
-
border-radius: 20px;
|
| 279 |
-
cursor: pointer;
|
| 280 |
-
transition: border-color .2s, background .2s;
|
| 281 |
-
white-space: nowrap;
|
| 282 |
}
|
| 283 |
-
|
| 284 |
-
border-color: var(--clr-primary);
|
| 285 |
-
background: rgba(255,107,53,.1);
|
| 286 |
-
color: var(--clr-primary);
|
| 287 |
}
|
| 288 |
|
| 289 |
/* ── Messages de chat ── */
|
|
@@ -507,12 +501,7 @@ SUGGESTED = [
|
|
| 507 |
if "chip_prompt" not in st.session_state:
|
| 508 |
st.session_state.chip_prompt = None
|
| 509 |
|
| 510 |
-
|
| 511 |
-
f'<span class="chip" onclick="void(0)">{c}</span>' for c in SUGGESTED
|
| 512 |
-
) + '</div>'
|
| 513 |
-
st.markdown(chips_html, unsafe_allow_html=True)
|
| 514 |
-
|
| 515 |
-
# Boutons Streamlit réels pour les chips (invisibles mais fonctionnels)
|
| 516 |
cols = st.columns(len(SUGGESTED))
|
| 517 |
for i, (col, label) in enumerate(zip(cols, SUGGESTED)):
|
| 518 |
with col:
|
|
|
|
| 261 |
}
|
| 262 |
@media (max-width: 480px) { .hero-badge { display: none; } }
|
| 263 |
|
| 264 |
+
/* ── Chips de suggestion de question (boutons Streamlit stylisés) ── */
|
| 265 |
+
div[data-testid="stHorizontalBlock"] button[kind="secondary"] {
|
| 266 |
+
border-radius: 20px !important;
|
| 267 |
+
border: 1px solid var(--clr-border) !important;
|
| 268 |
+
background: var(--clr-surface) !important;
|
| 269 |
+
color: var(--clr-text) !important;
|
| 270 |
+
font-size: .75rem !important;
|
| 271 |
+
font-weight: 500 !important;
|
| 272 |
+
padding: 4px 10px !important;
|
| 273 |
+
white-space: normal !important;
|
| 274 |
+
line-height: 1.3 !important;
|
| 275 |
+
transition: border-color .2s, background .2s, color .2s !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
}
|
| 277 |
+
div[data-testid="stHorizontalBlock"] button[kind="secondary"]:hover {
|
| 278 |
+
border-color: var(--clr-primary) !important;
|
| 279 |
+
background: rgba(255,107,53,.1) !important;
|
| 280 |
+
color: var(--clr-primary) !important;
|
| 281 |
}
|
| 282 |
|
| 283 |
/* ── Messages de chat ── */
|
|
|
|
| 501 |
if "chip_prompt" not in st.session_state:
|
| 502 |
st.session_state.chip_prompt = None
|
| 503 |
|
| 504 |
+
# Boutons chips cliquables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 505 |
cols = st.columns(len(SUGGESTED))
|
| 506 |
for i, (col, label) in enumerate(zip(cols, SUGGESTED)):
|
| 507 |
with col:
|