Update app.py
Browse files
app.py
CHANGED
@@ -144,9 +144,16 @@ if submitted or 'dictee' in st.session_state:
|
|
144 |
st.divider()
|
145 |
st.markdown("## 📖 Phrases de la Dictée")
|
146 |
with st.expander("Cliquez ici pour ouvrir"):
|
147 |
-
|
148 |
-
|
149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
with col2:
|
152 |
st.markdown("## ✍️ Votre Dictée")
|
@@ -156,6 +163,7 @@ if submitted or 'dictee' in st.session_state:
|
|
156 |
st.session_state.correction = correction_dictee(dictee, dictee_user)
|
157 |
|
158 |
if 'correction' in st.session_state:
|
|
|
159 |
st.markdown("### 🎉 Voici la correction (*Par IA*) :")
|
160 |
st.markdown(st.session_state.correction)
|
161 |
|
|
|
144 |
st.divider()
|
145 |
st.markdown("## 📖 Phrases de la Dictée")
|
146 |
with st.expander("Cliquez ici pour ouvrir"):
|
147 |
+
cols_per_row = 3
|
148 |
+
rows = (len(audio_urls) + cols_per_row - 1) // cols_per_row # Arrondir au nombre supérieur
|
149 |
+
for i in range(rows):
|
150 |
+
cols = st.columns(cols_per_row)
|
151 |
+
for j in range(cols_per_row):
|
152 |
+
idx = i * cols_per_row + j
|
153 |
+
if idx < len(audio_urls):
|
154 |
+
with cols[j]:
|
155 |
+
st.markdown(f"**Phrase {idx + 1}:**")
|
156 |
+
st.audio(audio_urls[idx], format='audio/wav')
|
157 |
|
158 |
with col2:
|
159 |
st.markdown("## ✍️ Votre Dictée")
|
|
|
163 |
st.session_state.correction = correction_dictee(dictee, dictee_user)
|
164 |
|
165 |
if 'correction' in st.session_state:
|
166 |
+
st.divider()
|
167 |
st.markdown("### 🎉 Voici la correction (*Par IA*) :")
|
168 |
st.markdown(st.session_state.correction)
|
169 |
|