Spaces:
Running
on
Zero
Running
on
Zero
Julian Bilcke
commited on
Commit
·
1e88b9d
1
Parent(s):
49f2956
testing an improved gradio-pdf component
Browse files- app.py +2 -2
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -206,7 +206,7 @@ def generate_story_scenes(story_prompt, num_scenes, style_context="", panel_meta
|
|
| 206 |
panel_descriptions = [f"Panel {i+1}/{num_scenes}" for i in range(num_scenes)]
|
| 207 |
|
| 208 |
# Create system prompt with panel-specific guidance
|
| 209 |
-
system_prompt = f"""You are a
|
| 210 |
|
| 211 |
PANEL LAYOUT INFORMATION:
|
| 212 |
The page has {num_scenes} panels with the following characteristics:
|
|
@@ -289,7 +289,7 @@ Generate exactly {num_scenes} scenes. Output ONLY the YAML list, no other text."
|
|
| 289 |
# Format the messages
|
| 290 |
messages = [
|
| 291 |
{"role": "system", "content": system_prompt},
|
| 292 |
-
{"role": "user", "content": f"Create {num_scenes}
|
| 293 |
]
|
| 294 |
|
| 295 |
try:
|
|
|
|
| 206 |
panel_descriptions = [f"Panel {i+1}/{num_scenes}" for i in range(num_scenes)]
|
| 207 |
|
| 208 |
# Create system prompt with panel-specific guidance
|
| 209 |
+
system_prompt = f"""You are a story writer with expertise in cinematography and visual storytelling. Generate exactly {num_scenes} panels for a short story, based on the user's story prompt.
|
| 210 |
|
| 211 |
PANEL LAYOUT INFORMATION:
|
| 212 |
The page has {num_scenes} panels with the following characteristics:
|
|
|
|
| 289 |
# Format the messages
|
| 290 |
messages = [
|
| 291 |
{"role": "system", "content": system_prompt},
|
| 292 |
+
{"role": "user", "content": f"Create {num_scenes} scenes for this story: {story_prompt}"}
|
| 293 |
]
|
| 294 |
|
| 295 |
try:
|
requirements.txt
CHANGED
|
@@ -8,4 +8,4 @@ dashscope
|
|
| 8 |
pyyaml
|
| 9 |
reportlab
|
| 10 |
pypdf2
|
| 11 |
-
|
|
|
|
| 8 |
pyyaml
|
| 9 |
reportlab
|
| 10 |
pypdf2
|
| 11 |
+
git+https://github.com/jbilcke-hf/gradio-pdf.git
|