Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -122,7 +122,7 @@ st.markdown('</div>', unsafe_allow_html=True)
|
|
| 122 |
if st.button("Traduire"):
|
| 123 |
if text_to_translate:
|
| 124 |
try:
|
| 125 |
-
response = requests.post('https://17a8-102-180-109-59.ngrok-free.app/translate/', json={"text": text_to_translate, "lang": st.session_state.target_lang}, timeout=1000)
|
| 126 |
if response.status_code == 200:
|
| 127 |
translation = response.json # st.session_state.text_to_translate = " " # st.session_state.text_to_translate = " "()["translation"]
|
| 128 |
st.session_state.translation = translation
|
|
|
|
| 122 |
if st.button("Traduire"):
|
| 123 |
if text_to_translate:
|
| 124 |
try:
|
| 125 |
+
response = requests.post('https://17a8-102-180-109-59.ngrok-free.app/translate/', json={"text": st.session_state.text_to_translate, "lang": st.session_state.target_lang}, timeout=1000)
|
| 126 |
if response.status_code == 200:
|
| 127 |
translation = response.json # st.session_state.text_to_translate = " " # st.session_state.text_to_translate = " "()["translation"]
|
| 128 |
st.session_state.translation = translation
|