Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,10 +34,10 @@ if uploaded_file is not None:
|
|
| 34 |
|
| 35 |
if st.button("Create"):
|
| 36 |
try:
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
|
| 42 |
|
| 43 |
with open(output_filename, "rb") as file:
|
|
@@ -52,8 +52,8 @@ if uploaded_file is not None:
|
|
| 52 |
|
| 53 |
|
| 54 |
except Exception as e:
|
| 55 |
-
|
| 56 |
-
|
| 57 |
|
| 58 |
|
| 59 |
|
|
|
|
| 34 |
|
| 35 |
if st.button("Create"):
|
| 36 |
try:
|
| 37 |
+
save_it = gTTS(text=translated_text, lang=lang, slow=False)
|
| 38 |
+
output_filename = str(text[:5]) + '.mp3'
|
| 39 |
+
save_it.save(output_filename)
|
| 40 |
+
st.success(f"Here is your file: {output_filename}")
|
| 41 |
|
| 42 |
|
| 43 |
with open(output_filename, "rb") as file:
|
|
|
|
| 52 |
|
| 53 |
|
| 54 |
except Exception as e:
|
| 55 |
+
st.error("Error.")
|
| 56 |
+
print("Hata:", e)
|
| 57 |
|
| 58 |
|
| 59 |
|