Update app.py
Browse files
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 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
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")
|