Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,11 +32,14 @@ def save_temp_file(content, filename="output.srt"):
|
|
32 |
|
33 |
# Streamlit app
|
34 |
st.title("Text to SRT Converter")
|
35 |
-
|
36 |
-
|
|
|
|
|
37 |
if text:
|
38 |
srt_path = text_to_srt(text)
|
39 |
with open(srt_path, "r") as file:
|
40 |
-
st.download_button(label="Download SRT File", data=file, file_name="output.srt", mime="text/plain")
|
41 |
else:
|
42 |
-
st.warning("Please enter some text.")
|
|
|
|
32 |
|
33 |
# Streamlit app
|
34 |
st.title("Text to SRT Converter")
|
35 |
+
st.markdown("For API use, please visit [this space](https://huggingface.co/spaces/Lenylvt/Text_to_SRT-API).")
|
36 |
+
|
37 |
+
text = st.text_area("🗯️ Enter text", height=300)
|
38 |
+
if st.button("📁 Convert to SRT"):
|
39 |
if text:
|
40 |
srt_path = text_to_srt(text)
|
41 |
with open(srt_path, "r") as file:
|
42 |
+
st.download_button(label="⬇️ Download SRT File", data=file, file_name="output.srt", mime="text/plain")
|
43 |
else:
|
44 |
+
st.warning("🔴 Please enter some text.")
|
45 |
+
|