Lenylvt commited on
Commit
dcea766
1 Parent(s): bf1eb9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -14
app.py CHANGED
@@ -194,21 +194,20 @@ if submitted or st.session_state.dictee != None:
194
 
195
  col1, col2 = st.columns(2)
196
  with col1:
197
- st.markdown("## 📖 Dictée en entier")
198
- st.audio(concatenated_audio_path, format='audio/wav', start_time=0)
199
  st.divider()
200
- st.markdown("## 📖 Phrases de la Dictée")
201
- with st.expander("Cliquez ici pour ouvrir"):
202
- cols_per_row = 2
203
- rows = (len(audio_urls) + cols_per_row - 1) // cols_per_row # Arrondir au nombre supérieur
204
- for i in range(rows):
205
- cols = st.columns(cols_per_row)
206
- for j in range(cols_per_row):
207
- idx = i * cols_per_row + j
208
- if idx < len(audio_urls):
209
- with cols[j]:
210
- st.markdown(f"**Phrase {idx + 1}:**")
211
- st.audio(audio_urls[idx], format='audio/wav')
212
 
213
  with col2:
214
  st.markdown("## ✍️ Votre Dictée")
 
194
 
195
  col1, col2 = st.columns(2)
196
  with col1:
197
+ st.sidebar.markdown("## 📖 Dictée en entier")
198
+ st.sidebar.audio(concatenated_audio_path, format='audio/wav', start_time=0)
199
  st.divider()
200
+ st.sidebar.markdown("## 📖 Phrases de la Dictée")
201
+ cols_per_row = 2
202
+ rows = (len(audio_urls) + cols_per_row - 1) // cols_per_row # Arrondir au nombre supérieur
203
+ for i in range(rows):
204
+ cols = st.columns(cols_per_row)
205
+ for j in range(cols_per_row):
206
+ idx = i * cols_per_row + j
207
+ if idx < len(audio_urls):
208
+ with cols[j]:
209
+ st.sidebar.markdown(f"**Phrase {idx + 1}:**")
210
+ st.sidebar.audio(audio_urls[idx], format='audio/wav')
 
211
 
212
  with col2:
213
  st.markdown("## ✍️ Votre Dictée")