GiorgioV commited on
Commit
0f134af
·
verified ·
1 Parent(s): 0edc711

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -8,11 +8,11 @@ import ffmpeg
8
  def finalise_video(start_video):
9
  try:
10
  with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as video_tmpfile:
11
- if isinstance(start_video, str):
12
- shutil.copy(start_video, video_tmpfile.name)
13
- else:
14
- start_video.save(video_tmpfile.name, format="MP4")
15
- video_path = video_tmpfile.name
16
 
17
  with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as audio_tmpfile:
18
  video_with_audio_path = audio_tmpfile.name
 
8
  def finalise_video(start_video):
9
  try:
10
  with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as video_tmpfile:
11
+ if isinstance(start_video, str):
12
+ shutil.copy(start_video, video_tmpfile.name)
13
+ else:
14
+ start_video.save(video_tmpfile.name, format="MP4")
15
+ video_path = video_tmpfile.name
16
 
17
  with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as audio_tmpfile:
18
  video_with_audio_path = audio_tmpfile.name