Shalmoni commited on
Commit
f234a17
·
verified ·
1 Parent(s): 9628a3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -17
app.py CHANGED
@@ -93,35 +93,36 @@ def _prompt_with_tags(user_prompt: str, n_shots: int, default_fps: int, default_
93
  f"'''{user_prompt}'''\n\n"
94
  "Each item schema:\n"
95
  "{\n"
96
- ' \"id\": <int starting at 1>,\n'
97
- ' \"title\": \"Short shot title\",\n'
98
- ' \"description\": \"Highly specific visual description for image generation. Include camera angle, framing, time of day, subject position, lighting, mood, and background details.\",\n'
99
- f" \"duration\": {default_len},\n"
100
- f" \"fps\": {default_fps},\n"
101
- " \"steps\": 30,\n"
102
- " \"seed\": null,\n"
103
- ' \"negative\": \"\"\n"
104
  "}\n\n"
105
  "Output must start with <JSON> and end with </JSON>.\n"
106
  )
107
 
 
108
  def _prompt_minimal(user_prompt: str, n_shots: int, default_fps: int, default_len: int) -> str:
109
  return (
110
  "Reply ONLY with a JSON array starting with '[' and ending with ']'. No extra text.\n"
111
  f"Storyboard: {n_shots} shots for:\n'''{user_prompt}'''\n"
112
  "Item schema:\n"
113
  "{\n"
114
- ' \"id\": <int starting at 1>,\n'
115
- ' \"title\": \"Short title\",\n'
116
- ' \"description\": \"Visual description\",\n'
117
- f" \"duration\": {default_len},\n"
118
- f" \"fps\": {default_fps},\n"
119
- " \"steps\": 30,\n"
120
- " \"seed\": null,\n"
121
- ' \"negative\": \"\"\n"
122
  "}\n"
123
  )
124
-
125
  def _apply_chat(tok, system_msg: str, user_msg: str) -> str:
126
  if hasattr(tok, "apply_chat_template"):
127
  return tok.apply_chat_template(
 
93
  f"'''{user_prompt}'''\n\n"
94
  "Each item schema:\n"
95
  "{\n"
96
+ ' "id": <int starting at 1>,\n'
97
+ ' "title": "Short shot title",\n'
98
+ ' "description": "Highly specific visual description for image generation. Include camera angle, framing, time of day, subject position, lighting, mood, and background details.",\n'
99
+ f' "duration": {default_len},\n'
100
+ f' "fps": {default_fps},\n'
101
+ ' "steps": 30,\n'
102
+ ' "seed": null,\n'
103
+ ' "negative": ""\n'
104
  "}\n\n"
105
  "Output must start with <JSON> and end with </JSON>.\n"
106
  )
107
 
108
+
109
  def _prompt_minimal(user_prompt: str, n_shots: int, default_fps: int, default_len: int) -> str:
110
  return (
111
  "Reply ONLY with a JSON array starting with '[' and ending with ']'. No extra text.\n"
112
  f"Storyboard: {n_shots} shots for:\n'''{user_prompt}'''\n"
113
  "Item schema:\n"
114
  "{\n"
115
+ ' "id": <int starting at 1>,\n'
116
+ ' "title": "Short title",\n'
117
+ ' "description": "Visual description",\n'
118
+ f' "duration": {default_len},\n'
119
+ f' "fps": {default_fps},\n'
120
+ ' "steps": 30,\n'
121
+ ' "seed": null,\n'
122
+ ' "negative": ""\n'
123
  "}\n"
124
  )
125
+
126
  def _apply_chat(tok, system_msg: str, user_msg: str) -> str:
127
  if hasattr(tok, "apply_chat_template"):
128
  return tok.apply_chat_template(