sreepathi-ravikumar commited on
Commit
6827a99
·
verified ·
1 Parent(s): 6bba694

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -41,6 +41,9 @@ def get_video():
41
  ]
42
  video_path = video_generation(text,prompts)
43
  video_url = f"https://sreepathi-ravikumar-backendprocess.hf.space/{os.path.basename(video_path)}"
 
 
 
44
  return jsonify({"video_url": video_url})
45
 
46
  # Construct URL (adjust domain/port if needed)
 
41
  ]
42
  video_path = video_generation(text,prompts)
43
  video_url = f"https://sreepathi-ravikumar-backendprocess.hf.space/{os.path.basename(video_path)}"
44
+ if not os.path.exists(video_file):
45
+ return "Video file not found.", 404
46
+
47
  return jsonify({"video_url": video_url})
48
 
49
  # Construct URL (adjust domain/port if needed)