CedM commited on
Commit
758f35a
·
verified ·
1 Parent(s): adfcc67

Déploiement automatique depuis GitLab CI

Browse files
Files changed (1) hide show
  1. 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
- .chips-row {
266
- display: flex;
267
- flex-wrap: wrap;
268
- gap: 8px;
269
- margin-bottom: 1.2rem;
270
- }
271
- .chip {
272
- background: var(--clr-surface);
273
- border: 1px solid var(--clr-border);
274
- color: var(--clr-text);
275
- font-size: .75rem;
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
- .chip:hover {
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
- chips_html = '<div class="chips-row">' + "".join(
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: