๐ฌ Movie to Comic Generator
Starting...
-โ Generation Complete! Opening your comic...
diff --git "a/app_enhanced.py" "b/app_enhanced.py" --- "a/app_enhanced.py" +++ "b/app_enhanced.py" @@ -2,18 +2,13 @@ import os import webbrowser import time import threading -from flask import Flask, render_template, request, jsonify, send_from_directory, send_file -from pathlib import Path -import cv2 -import numpy as np -from PIL import Image -import srt -import json +import uuid import shutil -from typing import List +import json import traceback +from typing import List from concurrent.futures import ThreadPoolExecutor - +from flask import Flask, render_template, request, jsonify, send_from_directory, send_file, session # --- ROBUST IMPORTS WITH FALLBACKS --- try: @@ -42,7 +37,6 @@ except Exception as e: def batch_enhance(self, *args, **kwargs): print("-> Skipping quality color enhancement (module not loaded).") def enhance_single(self, *args, **kwargs): print("-> Skipping quality color enhancement (module not loaded).") - try: from backend.class_def import bubble, panel, Page print("โ Core class definitions (bubble, panel, Page) loaded.") @@ -64,8 +58,12 @@ try: except Exception as e: print(f"โ ๏ธ Could not load a core utility module: {e}") +# --- FLASK APP SETUP --- app = Flask(__name__) +app.secret_key = "REPLACE_THIS_WITH_A_SECRET_KEY_IN_PRODUCTION" +BASE_USER_DIR = "userdata" +# --- MERGED HTML: UPLOAD UI + EDITOR UI --- INDEX_HTML = ''' @@ -73,18 +71,31 @@ INDEX_HTML = '''
Starting...
-โ Generation Complete! Opening your comic...