Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,20 @@ def text_to_srt(text):
|
|
| 26 |
return temp_file_path
|
| 27 |
|
| 28 |
with gr.Blocks() as app:
|
| 29 |
-
gr.Markdown("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
text_input = gr.TextArea(label="Enter text")
|
| 31 |
output = gr.File(label="Download SRT File", file_count="single")
|
| 32 |
text_input.change(fn=text_to_srt, inputs=text_input, outputs=output)
|
|
|
|
| 26 |
return temp_file_path
|
| 27 |
|
| 28 |
with gr.Blocks() as app:
|
| 29 |
+
gr.Markdown("""
|
| 30 |
+
# Text to SRT Converter
|
| 31 |
+
|
| 32 |
+
Convert your timestamped text into SRT format easily. Please format your input text as follows (this is format for [Whisper JAX](https://huggingface.co/spaces/sanchit-gandhi/whisper-jax)):
|
| 33 |
+
|
| 34 |
+
```
|
| 35 |
+
[00:00:00 -> 00:00:05] Line of dialogue 1
|
| 36 |
+
[00:00:06 -> 00:00:10] Line of dialogue 2
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
Each line should include a start and end time, followed by the dialogue, separated by ' -> '. Times should be in HH:MM:SS format, or MM:SS if under an hour.
|
| 40 |
+
|
| 41 |
+
For web use, please visit [this space](https://huggingface.co/spaces/Lenylvt/Text_to_SRT).
|
| 42 |
+
""")
|
| 43 |
text_input = gr.TextArea(label="Enter text")
|
| 44 |
output = gr.File(label="Download SRT File", file_count="single")
|
| 45 |
text_input.change(fn=text_to_srt, inputs=text_input, outputs=output)
|