jhh6576 commited on
Commit
647b7af
·
verified ·
1 Parent(s): f986e65

Update app_enhanced.py

Browse files
Files changed (1) hide show
  1. app_enhanced.py +1 -4
app_enhanced.py CHANGED
@@ -63,7 +63,6 @@ try:
63
  except Exception as e:
64
  print(f"⚠️ Could not load a core utility module: {e}")
65
 
66
- # (Other optional imports for smart features)
67
  app = Flask(__name__)
68
 
69
  os.makedirs('video', exist_ok=True)
@@ -199,7 +198,6 @@ class EnhancedComicGenerator:
199
  if not cap.isOpened():
200
  return {"success": False, "message": "Cannot open video."}
201
 
202
- # Check if timestamp is valid
203
  fps = cap.get(cv2.CAP_PROP_FPS)
204
  if fps == 0: fps = 25
205
  total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
@@ -345,7 +343,6 @@ class EnhancedComicGenerator:
345
  print("❌ Subtitle file (test1.srt) not found!")
346
  return False
347
 
348
- # Simplified for robustness
349
  filtered_subs = all_subs
350
 
351
  key_moments = [{'index': s.index, 'text': s.content, 'start': s.start.total_seconds(), 'end': s.end.total_seconds()} for s in filtered_subs]
@@ -1125,4 +1122,4 @@ def frame_file(filename):
1125
  if __name__ == '__main__':
1126
  port = int(os.getenv("PORT", 7860))
1127
  print(f"🚀 Starting Enhanced Comic Generator on host 0.0.0.0, port {port}")
1128
- app.run(debug=False, host='0.0.0.0', port=port)```
 
63
  except Exception as e:
64
  print(f"⚠️ Could not load a core utility module: {e}")
65
 
 
66
  app = Flask(__name__)
67
 
68
  os.makedirs('video', exist_ok=True)
 
198
  if not cap.isOpened():
199
  return {"success": False, "message": "Cannot open video."}
200
 
 
201
  fps = cap.get(cv2.CAP_PROP_FPS)
202
  if fps == 0: fps = 25
203
  total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
 
343
  print("❌ Subtitle file (test1.srt) not found!")
344
  return False
345
 
 
346
  filtered_subs = all_subs
347
 
348
  key_moments = [{'index': s.index, 'text': s.content, 'start': s.start.total_seconds(), 'end': s.end.total_seconds()} for s in filtered_subs]
 
1122
  if __name__ == '__main__':
1123
  port = int(os.getenv("PORT", 7860))
1124
  print(f"🚀 Starting Enhanced Comic Generator on host 0.0.0.0, port {port}")
1125
+ app.run(debug=False, host='0.0.0.0', port=port)