Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Flask frontend with dark theme UI and video generation workflow #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
.
sohambuilds committed Mar 10, 2025
commit cfb196775d203a89bb7bd3ac1ed0cb9cfae7d3c3
11 changes: 1 addition & 10 deletions app.py
Original file line number Diff line number Diff line change
@@ -7,14 +7,7 @@
import threading
from datetime import datetime

# Import ForgeTube components
# We'll integrate with the existing components when needed
# from diffusion.scripts.generate_script import VideoScriptGenerator
# from diffusion.scripts.generate_image_local import main_generate_image
# from tts.scripts.generate_audio import main_generate_audio
# from assembly.scripts.assembly_video import create_video, create_complete_srt, extract_topic_from_json

# Initialize Flask app
app = Flask(__name__)
app.secret_key = os.urandom(24)
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB max upload size
@@ -70,8 +63,6 @@ def generate_video_task(task_id, topic, duration, key_points, api_keys):
task['script'] = script
task['status'] = 'Script generated'

# In a real implementation, continue with image generation, audio generation, and video assembly
# For now, we'll simulate these steps
task['status'] = 'Generating images...'
time.sleep(3) # Simulate image generation

@@ -82,7 +73,7 @@ def generate_video_task(task_id, topic, duration, key_points, api_keys):
time.sleep(3) # Simulate video assembly

task['status'] = 'Completed'
task['result_url'] = f"/results/{task_id}.mp4" # This would be the actual video URL
task['result_url'] = f"/results/{task_id}.mp4"

# Routes
@app.route('/')