Update app.py
Browse files
app.py
CHANGED
@@ -144,7 +144,7 @@ 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 |
-
cols_per_row =
|
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)
|
@@ -157,13 +157,12 @@ if submitted or 'dictee' in st.session_state:
|
|
157 |
|
158 |
with col2:
|
159 |
st.markdown("## ✍️ Votre Dictée")
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
correction = correction_dictee(dictee, dictee_user)
|
164 |
-
st.session_state.correction = correction
|
165 |
|
166 |
-
if
|
|
|
167 |
st.divider()
|
168 |
st.markdown("### 🎉 Voici la correction (*Par IA*) :")
|
169 |
st.markdown(st.session_state.correction)
|
|
|
144 |
st.divider()
|
145 |
st.markdown("## 📖 Phrases de la Dictée")
|
146 |
with st.expander("Cliquez ici pour ouvrir"):
|
147 |
+
cols_per_row = 2
|
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)
|
|
|
157 |
|
158 |
with col2:
|
159 |
st.markdown("## ✍️ Votre Dictée")
|
160 |
+
with st.form("dictee_form"):
|
161 |
+
dictee_user = st.text_area("Écrivez la dictée ici:", key="dictee_user", height=350)
|
162 |
+
correct = st.form_submit_button("📝 Correction")
|
|
|
|
|
163 |
|
164 |
+
if correction or 'dictee' in st.session_state:
|
165 |
+
st.session_state.correction = correction_dictee(dictee, dictee_user)
|
166 |
st.divider()
|
167 |
st.markdown("### 🎉 Voici la correction (*Par IA*) :")
|
168 |
st.markdown(st.session_state.correction)
|