sreepathi-ravikumar commited on
Commit
d2063f5
·
verified ·
1 Parent(s): e16d0bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -11
app.py CHANGED
@@ -74,24 +74,15 @@ def generate_video():
74
  # ... [your existing line processing code] ...
75
 
76
  if True:
77
- video_link = "/app/data/video/clip0.mp4"
78
- audio_link = "/app/data/sound/audio0.mp3"
79
-
80
  # Generate the video
81
  try:
82
- video_func(0, lines, lang)
83
  except Exception as video_error:
84
  print(f"Video generation failed: {video_error}")
85
  traceback.print_exc()
86
  return jsonify({"error": f"Video generation failed: {str(video_error)}"}), 500
87
 
88
- # Verify the file was created and has content
89
- if not os.path.exists(video_link):
90
- return jsonify({"error": "Video file was not created"}), 500
91
-
92
- if os.path.getsize(video_link) == 0:
93
- return jsonify({"error": "Video file is empty"}), 500
94
-
95
  # Clean up old files after successful generation
96
  try:
97
  if os.path.exists(audio_link):
 
74
  # ... [your existing line processing code] ...
75
 
76
  if True:
 
 
 
77
  # Generate the video
78
  try:
79
+ video_func(0, prompt, lang)
80
  except Exception as video_error:
81
  print(f"Video generation failed: {video_error}")
82
  traceback.print_exc()
83
  return jsonify({"error": f"Video generation failed: {str(video_error)}"}), 500
84
 
85
+
 
 
 
 
 
 
86
  # Clean up old files after successful generation
87
  try:
88
  if os.path.exists(audio_link):