Uhhy commited on
Commit
214f94e
·
verified ·
1 Parent(s): 706743c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -148,14 +148,14 @@ async def generate_video_api(source_image: UploadFile = File(...), driven_audio:
148
  with open(temp_source_image_path, "wb") as buffer:
149
  shutil.copyfileobj(source_image.file, buffer)
150
 
151
- if driven_audio:
152
  temp_driven_audio_path = f"temp/{driven_audio.filename}"
153
  with open(temp_driven_audio_path, "wb") as buffer:
154
  shutil.copyfileobj(driven_audio.file, buffer)
155
  else:
156
  temp_driven_audio_path = None
157
 
158
- if ref_video:
159
  temp_ref_video_path = f"temp/{ref_video.filename}"
160
  with open(temp_ref_video_path, "wb") as buffer:
161
  shutil.copyfileobj(ref_video.file, buffer)
 
148
  with open(temp_source_image_path, "wb") as buffer:
149
  shutil.copyfileobj(source_image.file, buffer)
150
 
151
+ if driven_audio is not None:
152
  temp_driven_audio_path = f"temp/{driven_audio.filename}"
153
  with open(temp_driven_audio_path, "wb") as buffer:
154
  shutil.copyfileobj(driven_audio.file, buffer)
155
  else:
156
  temp_driven_audio_path = None
157
 
158
+ if ref_video is not None:
159
  temp_ref_video_path = f"temp/{ref_video.filename}"
160
  with open(temp_ref_video_path, "wb") as buffer:
161
  shutil.copyfileobj(ref_video.file, buffer)