Acasset45654 commited on
Commit
363d801
·
verified ·
1 Parent(s): ae5e867

Update refApp.py

Browse files
Files changed (1) hide show
  1. refApp.py +13 -2
refApp.py CHANGED
@@ -141,6 +141,19 @@ st.markdown("""
141
  width: 100vw !important;
142
  }
143
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  </style>
145
  """, unsafe_allow_html=True)
146
 
@@ -1362,7 +1375,6 @@ elif st.session_state.view_mode == "edit":
1362
  # Description
1363
  new_desc = st.text_area("Description (aide pour l'utilisateur):", value=current_prompt_config.get('description', ''), height=100, key=f"desc_text_area_{safe_family_key_part}_{safe_uc_key_part}")
1364
 
1365
- st.markdown("""<style> div[data-testid="stExpander"] div[data-testid="stCodeBlock"] { margin-top: 0.1rem !important; margin-bottom: 0.15rem !important; padding-top: 0.1rem !important; padding-bottom: 0.1rem !important; } div[data-testid="stExpander"] div[data-testid="stCodeBlock"] pre { padding-top: 0.2rem !important; padding-bottom: 0.2rem !important; line-height: 1.1 !important; font-size: 0.85em !important; margin: 0 !important; } </style>""", unsafe_allow_html=True)
1366
  st.markdown("##### Variables disponibles à insérer :"); variables_config = current_prompt_config.get('variables', [])
1367
  if not variables_config: st.caption("Aucune variable définie pour ce prompt. Ajoutez-en ci-dessous.")
1368
  else:
@@ -1803,7 +1815,6 @@ elif st.session_state.view_mode == "generator":
1803
  template_text_area_key = f"template_text_area_{safe_family_key_part}_{safe_uc_key_part}"; new_tpl = st.text_area("Template:", value=current_prompt_config.get('template', ''), height=200, key=template_text_area_key)
1804
  # Description
1805
  new_desc = st.text_area("Description (aide pour l'utilisateur):", value=current_prompt_config.get('description', ''), height=100, key=f"desc_text_area_{safe_family_key_part}_{safe_uc_key_part}")
1806
- st.markdown("""<style> div[data-testid=\"stExpander\"] div[data-testid=\"stCodeBlock\"] { margin-top: 0.1rem !important; margin-bottom: 0.15rem !important; padding-top: 0.1rem !important; padding-bottom: 0.1rem !important; } div[data-testid=\"stExpander\"] div[data-testid=\"stCodeBlock\"] pre { padding-top: 0.2rem !important; padding-bottom: 0.2rem !important; line-height: 1.1 !important; font-size: 0.85em !important; margin: 0 !important; } </style>""", unsafe_allow_html=True)
1807
  st.markdown("##### Variables disponibles à insérer :"); variables_config = current_prompt_config.get('variables', [])
1808
  if not variables_config: st.caption("Aucune variable définie pour ce prompt. Ajoutez-en ci-dessous.")
1809
  else:
 
141
  width: 100vw !important;
142
  }
143
  }
144
+ div[data-testid="stExpander"] div[data-testid="stCodeBlock"] {
145
+ margin-top: 0.1rem !important;
146
+ margin-bottom: 0.15rem !important;
147
+ padding-top: 0.1rem !important;
148
+ padding-bottom: 0.1rem !important;
149
+ }
150
+ div[data-testid="stExpander"] div[data-testid="stCodeBlock"] pre {
151
+ padding-top: 0.2rem !important;
152
+ padding-bottom: 0.2rem !important;
153
+ line-height: 1.1 !important;
154
+ font-size: 0.85em !important;
155
+ margin: 0 !important;
156
+ }
157
  </style>
158
  """, unsafe_allow_html=True)
159
 
 
1375
  # Description
1376
  new_desc = st.text_area("Description (aide pour l'utilisateur):", value=current_prompt_config.get('description', ''), height=100, key=f"desc_text_area_{safe_family_key_part}_{safe_uc_key_part}")
1377
 
 
1378
  st.markdown("##### Variables disponibles à insérer :"); variables_config = current_prompt_config.get('variables', [])
1379
  if not variables_config: st.caption("Aucune variable définie pour ce prompt. Ajoutez-en ci-dessous.")
1380
  else:
 
1815
  template_text_area_key = f"template_text_area_{safe_family_key_part}_{safe_uc_key_part}"; new_tpl = st.text_area("Template:", value=current_prompt_config.get('template', ''), height=200, key=template_text_area_key)
1816
  # Description
1817
  new_desc = st.text_area("Description (aide pour l'utilisateur):", value=current_prompt_config.get('description', ''), height=100, key=f"desc_text_area_{safe_family_key_part}_{safe_uc_key_part}")
 
1818
  st.markdown("##### Variables disponibles à insérer :"); variables_config = current_prompt_config.get('variables', [])
1819
  if not variables_config: st.caption("Aucune variable définie pour ce prompt. Ajoutez-en ci-dessous.")
1820
  else: