Spaces:
Sleeping
Sleeping
Deployer commited on
Commit Β·
53966d0
1
Parent(s): 788ec93
π€ v3.6.0: Reduced maze scale to 900px for better margins
Browse files
main.py
CHANGED
|
@@ -115,7 +115,7 @@ def require_api_key(key: str = Security(api_key_header)):
|
|
| 115 |
app = FastAPI(
|
| 116 |
title="Video Quiz Pipeline",
|
| 117 |
description="Automated video generation pipeline for Hugging Face Spaces.",
|
| 118 |
-
version="3.
|
| 119 |
)
|
| 120 |
|
| 121 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
@@ -287,7 +287,7 @@ def build_video(maze_image: Image.Image, index: int, seo_title: str) -> tuple[Pa
|
|
| 287 |
# 4. Overlay maze centered on video
|
| 288 |
filter_complex = (
|
| 289 |
"[0:v]crop=in_h*9/16:in_h:(in_w-out_w)/2:0,scale=1080:1920[bg];"
|
| 290 |
-
|
| 291 |
"[bg][ovrl]overlay=(W-w)/2:(H-h)/2[vout]"
|
| 292 |
)
|
| 293 |
|
|
@@ -581,7 +581,7 @@ def status():
|
|
| 581 |
quizzes = load_quiz_data() if QUIZ_JSON_PATH.exists() else []
|
| 582 |
index = get_current_index()
|
| 583 |
return {
|
| 584 |
-
"version": "3.
|
| 585 |
"current_index": index,
|
| 586 |
"total_quizzes": len(quizzes),
|
| 587 |
"video_format": f"{VIDEO_WIDTH}x{VIDEO_HEIGHT} (9:16)",
|
|
|
|
| 115 |
app = FastAPI(
|
| 116 |
title="Video Quiz Pipeline",
|
| 117 |
description="Automated video generation pipeline for Hugging Face Spaces.",
|
| 118 |
+
version="3.6.0 - UI_RESIZE",
|
| 119 |
)
|
| 120 |
|
| 121 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 287 |
# 4. Overlay maze centered on video
|
| 288 |
filter_complex = (
|
| 289 |
"[0:v]crop=in_h*9/16:in_h:(in_w-out_w)/2:0,scale=1080:1920[bg];"
|
| 290 |
+
"[1:v]scale=900:-1[ovrl];"
|
| 291 |
"[bg][ovrl]overlay=(W-w)/2:(H-h)/2[vout]"
|
| 292 |
)
|
| 293 |
|
|
|
|
| 581 |
quizzes = load_quiz_data() if QUIZ_JSON_PATH.exists() else []
|
| 582 |
index = get_current_index()
|
| 583 |
return {
|
| 584 |
+
"version": "3.6.0 - UI_RESIZE",
|
| 585 |
"current_index": index,
|
| 586 |
"total_quizzes": len(quizzes),
|
| 587 |
"video_format": f"{VIDEO_WIDTH}x{VIDEO_HEIGHT} (9:16)",
|