Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -300,8 +300,10 @@ def generate_subtitles(audio_file_path, prompt, language, auto_detect_language):
|
|
300 |
srt_content = create_srt_from_text(transcription_text)
|
301 |
|
302 |
# Create a temporary file for SRT content
|
|
|
|
|
303 |
with tempfile.NamedTemporaryFile(mode="w", delete=False) as temp_srt_file:
|
304 |
-
temp_srt_path = temp_srt_file
|
305 |
temp_srt_file.write(srt_content)
|
306 |
|
307 |
# Generate subtitles and add to video if MP4
|
|
|
300 |
srt_content = create_srt_from_text(transcription_text)
|
301 |
|
302 |
# Create a temporary file for SRT content
|
303 |
+
tempfile.NamedTemporaryFile(suffix='.srt').name
|
304 |
+
|
305 |
with tempfile.NamedTemporaryFile(mode="w", delete=False) as temp_srt_file:
|
306 |
+
temp_srt_path = temp_srt_file.name
|
307 |
temp_srt_file.write(srt_content)
|
308 |
|
309 |
# Generate subtitles and add to video if MP4
|