Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,9 +18,7 @@ def text_to_srt(text):
|
|
18 |
def export_file(srt_content):
|
19 |
if srt_content.strip() == "":
|
20 |
return None
|
21 |
-
|
22 |
-
bytes_io = io.BytesIO(srt_content.encode('utf-8'))
|
23 |
-
return bytes_io, "output.srt"
|
24 |
|
25 |
with gr.Blocks() as app:
|
26 |
gr.Markdown("### Text to SRT Converter")
|
|
|
18 |
def export_file(srt_content):
|
19 |
if srt_content.strip() == "":
|
20 |
return None
|
21 |
+
return gr.File(content=srt_content.encode('utf-8'), file_name="output.srt")
|
|
|
|
|
22 |
|
23 |
with gr.Blocks() as app:
|
24 |
gr.Markdown("### Text to SRT Converter")
|