liuhuadai commited on
Commit
3880dd9
·
verified ·
1 Parent(s): 27f9239

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -414,6 +414,9 @@ def generate_audio_core(video_file, caption):
414
  status = log_step("📹 Step 2: Checking video duration...")
415
 
416
  duration = get_video_duration(mp4_path)
 
 
 
417
  log_step(f"⏱️ Step 2 cost: {time.time() - step_start:.2f}s")
418
 
419
  # ---- Step 3: Extract video frames ----
 
414
  status = log_step("📹 Step 2: Checking video duration...")
415
 
416
  duration = get_video_duration(mp4_path)
417
+ if duration > 15:
418
+ #yield log_step(f"❌ Video duration {duration:.1f}s exceeds the 15s limit. Please upload a shorter video."), None
419
+ return log_step(f"❌ Video duration {duration:.1f}s exceeds the 15s limit. Please upload a shorter video."), None
420
  log_step(f"⏱️ Step 2 cost: {time.time() - step_start:.2f}s")
421
 
422
  # ---- Step 3: Extract video frames ----