Spaces:
Sleeping
Sleeping
Update streamlit_app.py
Browse files- streamlit_app.py +5 -5
streamlit_app.py
CHANGED
|
@@ -4,6 +4,11 @@ from faster_whisper import WhisperModel
|
|
| 4 |
import textwrap
|
| 5 |
from datetime import timedelta
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
st.title("🎙️ Arabic VO to Subtitle Generator (.srt)")
|
| 8 |
|
| 9 |
# Upload and user controls
|
|
@@ -48,8 +53,3 @@ if uploaded_file:
|
|
| 48 |
|
| 49 |
st.text_area("Preview SRT", value=srt_text, height=300)
|
| 50 |
st.download_button("⬇️ Download .srt", srt_text, file_name="output.srt", mime="text/plain")
|
| 51 |
-
|
| 52 |
-
def format_time(seconds):
|
| 53 |
-
td = timedelta(seconds=seconds)
|
| 54 |
-
result = str(td)[:11].replace(".", ",")
|
| 55 |
-
return result if "," in result else result + ",000"
|
|
|
|
| 4 |
import textwrap
|
| 5 |
from datetime import timedelta
|
| 6 |
|
| 7 |
+
def format_time(seconds):
|
| 8 |
+
td = timedelta(seconds=seconds)
|
| 9 |
+
result = str(td)[:11].replace(".", ",")
|
| 10 |
+
return result if "," in result else result + ",000"
|
| 11 |
+
|
| 12 |
st.title("🎙️ Arabic VO to Subtitle Generator (.srt)")
|
| 13 |
|
| 14 |
# Upload and user controls
|
|
|
|
| 53 |
|
| 54 |
st.text_area("Preview SRT", value=srt_text, height=300)
|
| 55 |
st.download_button("⬇️ Download .srt", srt_text, file_name="output.srt", mime="text/plain")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|