Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -100,13 +100,7 @@ if "translation" not in st.session_state:
|
|
| 100 |
if "translation" not in st.session_state:
|
| 101 |
st.session_state.translation = "Traduction"
|
| 102 |
|
| 103 |
-
with col_swap:
|
| 104 |
-
st.write("")
|
| 105 |
-
swap = st.button("⇄")
|
| 106 |
|
| 107 |
-
if swap:
|
| 108 |
-
st.session_state.source_lang, st.session_state.target_lang = st.session_state.target_lang, st.session_state.source_lang
|
| 109 |
-
st.session_state.text_to_translate, st.session_state.translation = st.session_state.translation, st.session_state.text_to_translate
|
| 110 |
|
| 111 |
with col1:
|
| 112 |
st.markdown('<h3 class="col-container">'+st.session_state.source_lang+'</h3>', unsafe_allow_html=True)
|
|
@@ -115,6 +109,14 @@ with col1:
|
|
| 115 |
height=200,
|
| 116 |
placeholder="Entrez un texte ici"
|
| 117 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 120 |
if st.button("Traduire"):
|
|
|
|
| 100 |
if "translation" not in st.session_state:
|
| 101 |
st.session_state.translation = "Traduction"
|
| 102 |
|
|
|
|
|
|
|
|
|
|
| 103 |
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
with col1:
|
| 106 |
st.markdown('<h3 class="col-container">'+st.session_state.source_lang+'</h3>', unsafe_allow_html=True)
|
|
|
|
| 109 |
height=200,
|
| 110 |
placeholder="Entrez un texte ici"
|
| 111 |
)
|
| 112 |
+
|
| 113 |
+
with col_swap:
|
| 114 |
+
st.write("")
|
| 115 |
+
swap = st.button("⇄")
|
| 116 |
+
|
| 117 |
+
if swap:
|
| 118 |
+
st.session_state.source_lang, st.session_state.target_lang = st.session_state.target_lang, st.session_state.source_lang
|
| 119 |
+
st.session_state.text_to_translate, st.session_state.translation = st.session_state.translation, st.session_state.text_to_translate
|
| 120 |
|
| 121 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 122 |
if st.button("Traduire"):
|