Spaces:
Sleeping
Sleeping
Update app.py
#2
by
ouilyh
- opened
app.py
CHANGED
@@ -115,7 +115,7 @@ st.markdown('</div>', unsafe_allow_html=True)
|
|
115 |
if st.button("Traduire"):
|
116 |
if text_to_translate:
|
117 |
try:
|
118 |
-
response = requests.post('https://
|
119 |
if response.status_code == 200:
|
120 |
translation = response.json()["translation"]
|
121 |
st.session_state.translation = translation
|
|
|
115 |
if st.button("Traduire"):
|
116 |
if text_to_translate:
|
117 |
try:
|
118 |
+
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)
|
119 |
if response.status_code == 200:
|
120 |
translation = response.json()["translation"]
|
121 |
st.session_state.translation = translation
|