Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,23 +83,35 @@ def _lazy_model_tok():
|
|
| 83 |
|
| 84 |
def _prompt_with_tags(user_prompt: str, n_shots: int, default_fps: int, default_len: int) -> str:
|
| 85 |
return (
|
| 86 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
f"Create a storyboard of {n_shots} shots for this idea:\n\n"
|
| 88 |
f"'''{user_prompt}'''\n\n"
|
| 89 |
"Each item schema:\n"
|
| 90 |
"{\n"
|
| 91 |
' \"id\": <int starting at 1>,\n'
|
| 92 |
-
' \"title\": \"Short title\",\n'
|
| 93 |
-
' \"description\": \"
|
| 94 |
f" \"duration\": {default_len},\n"
|
| 95 |
f" \"fps\": {default_fps},\n"
|
| 96 |
" \"steps\": 30,\n"
|
| 97 |
" \"seed\": null,\n"
|
| 98 |
' \"negative\": \"\"\n'
|
| 99 |
"}\n\n"
|
| 100 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
)
|
| 102 |
|
|
|
|
| 103 |
def _prompt_minimal(user_prompt: str, n_shots: int, default_fps: int, default_len: int) -> str:
|
| 104 |
return (
|
| 105 |
"Reply ONLY with a JSON array starting with '[' and ending with ']'. No extra text.\n"
|
|
|
|
| 83 |
|
| 84 |
def _prompt_with_tags(user_prompt: str, n_shots: int, default_fps: int, default_len: int) -> str:
|
| 85 |
return (
|
| 86 |
+
"You are a **cinematographer and storyboard artist**. "
|
| 87 |
+
"Given a story idea, break it into a sequence of visually DISTINCT, DETAILED shots. "
|
| 88 |
+
"For each shot, provide **the objects in the scene, very specific camera placement, angle, subject position, lighting, and background details**. "
|
| 89 |
+
"Imagine you're describing frames for a film storyboard, NOT vague events.\n\n"
|
| 90 |
+
"Return ONLY a JSON array enclosed between <JSON> and </JSON> tags.\n"
|
| 91 |
f"Create a storyboard of {n_shots} shots for this idea:\n\n"
|
| 92 |
f"'''{user_prompt}'''\n\n"
|
| 93 |
"Each item schema:\n"
|
| 94 |
"{\n"
|
| 95 |
' \"id\": <int starting at 1>,\n'
|
| 96 |
+
' \"title\": \"Short shot title\",\n'
|
| 97 |
+
' \"description\": \"Highly specific visual description for image generation. Include camera angle, framing, time of day, subject position, lighting, mood, and background details. Be as descriptive as possible.\",\n'
|
| 98 |
f" \"duration\": {default_len},\n"
|
| 99 |
f" \"fps\": {default_fps},\n"
|
| 100 |
" \"steps\": 30,\n"
|
| 101 |
" \"seed\": null,\n"
|
| 102 |
' \"negative\": \"\"\n'
|
| 103 |
"}\n\n"
|
| 104 |
+
"Example of good description:\n"
|
| 105 |
+
"{\n"
|
| 106 |
+
" \"id\": 1,\n"
|
| 107 |
+
" \"title\": \"Low angle car approach\",\n"
|
| 108 |
+
" \"description\": \"A silver sedan drives towards the camera on a narrow mountain road at sunset. The camera is low to the ground near the center of the road, facing slightly upwards. Pine trees rise on both sides, and warm orange light hits the rocks. The car is centered, headlights on, creating dramatic shadows.\",\n"
|
| 109 |
+
" ...\n"
|
| 110 |
+
"}\n\n"
|
| 111 |
+
"Output must start with <JSON> and end with </JSON>.\n"
|
| 112 |
)
|
| 113 |
|
| 114 |
+
|
| 115 |
def _prompt_minimal(user_prompt: str, n_shots: int, default_fps: int, default_len: int) -> str:
|
| 116 |
return (
|
| 117 |
"Reply ONLY with a JSON array starting with '[' and ending with ']'. No extra text.\n"
|