Spaces:
Paused
Paused
Update utils/planner.py
Browse filesmoving generate prompt varistions to app.py
- utils/planner.py +0 -14
utils/planner.py
CHANGED
|
@@ -46,17 +46,3 @@ def extract_scene_plan(prompt: str) -> dict:
|
|
| 46 |
}
|
| 47 |
|
| 48 |
|
| 49 |
-
# ----------------------------
|
| 50 |
-
# 🧠 Generate Prompt Variations from Scene Plan
|
| 51 |
-
# ----------------------------
|
| 52 |
-
def generate_prompt_variations(base_prompt: str, scene_plan: dict, num_variations: int) -> list:
|
| 53 |
-
variations = []
|
| 54 |
-
scene = scene_plan.get("scene", {})
|
| 55 |
-
subject = scene_plan.get("subject", {})
|
| 56 |
-
layout = scene_plan.get("layout", {})
|
| 57 |
-
|
| 58 |
-
for i in range(num_variations):
|
| 59 |
-
enriched = f"{base_prompt}, in a {scene.get('environment', '')} setting with {scene.get('setting', '')}, featuring {subject.get('main_actor', '')}, layout includes {layout.get('foreground', '')} in foreground and {layout.get('background', '')} in background, style variation {i+1}"
|
| 60 |
-
variations.append(enriched.strip())
|
| 61 |
-
|
| 62 |
-
return variations
|
|
|
|
| 46 |
}
|
| 47 |
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|