Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -220,7 +220,7 @@ def format_content(document, content: str):
|
|
220 |
|
221 |
def generate_image_prompt(content: str, previous_prompts: str) -> str:
|
222 |
prompt_template = """
|
223 |
-
You are a creative assistant tasked with generating visually stunning, realistic image prompts for a
|
224 |
|
225 |
Blog Post Draft:
|
226 |
{blog_post_content}
|
@@ -231,26 +231,24 @@ Previous Image Prompts:
|
|
231 |
Instructions:
|
232 |
- Create image prompts that evoke emotional resonance, enhance storytelling, and maintain professional visual appeal.
|
233 |
- Include the following key components:
|
234 |
-
1. **Subject/Scene**: Clearly specify the subject(s)
|
235 |
-
2. **Composition and Action**: Describe spatial arrangements, depth, and active storytelling moments. For example, a
|
236 |
-
3. **Emotion and Style**: Convey a mood or artistic style (e.g., natural,
|
237 |
-
4. **Lighting and Color**: Use lighting to enhance the tone, such as soft natural light,
|
238 |
-
5. **Camera and Lens Settings**: Recommend camera models (e.g., Canon EOS R5,
|
239 |
-
6. **Artistic Enhancements**: Suggest details like angles (e.g.,
|
240 |
7. **Aspect Ratio and Style Tags**: Specify dimensions (e.g., --ar 16:9 for banners or --ar 4:5 for Instagram). Include style tags like --style cinematic, --style raw, or --style editorial.
|
241 |
|
242 |
Examples:
|
243 |
-
1. A
|
244 |
|
245 |
-
2. A
|
246 |
|
247 |
-
3. A
|
248 |
|
249 |
-
4. A
|
250 |
|
251 |
-
5. A close-up of
|
252 |
-
|
253 |
-
---
|
254 |
|
255 |
"""
|
256 |
|
|
|
220 |
|
221 |
def generate_image_prompt(content: str, previous_prompts: str) -> str:
|
222 |
prompt_template = """
|
223 |
+
You are a creative assistant tasked with generating visually stunning, realistic image prompts for a blog. Each prompt should be meticulously detailed, emotionally engaging, and tailored to enhance the blog's storytelling and themes.
|
224 |
|
225 |
Blog Post Draft:
|
226 |
{blog_post_content}
|
|
|
231 |
Instructions:
|
232 |
- Create image prompts that evoke emotional resonance, enhance storytelling, and maintain professional visual appeal.
|
233 |
- Include the following key components:
|
234 |
+
1. **Subject/Scene**: Clearly specify the subject(s) or central themes. Highlight moments of connection, action, or visually engaging scenarios such as daily life, nature, or creative projects.
|
235 |
+
2. **Composition and Action**: Describe spatial arrangements, depth, and active storytelling moments. For example, a person journaling in a cozy nook, a couple walking hand-in-hand in a scenic park, or an artist sketching in a studio.
|
236 |
+
3. **Emotion and Style**: Convey a mood or artistic style (e.g., natural, cinematic, editorial). Emphasize emotional moments like joy, introspection, or vibrancy.
|
237 |
+
4. **Lighting and Color**: Use lighting to enhance the tone, such as soft natural light, dramatic shadows, or vibrant hues. Specify color palettes that suit the scene, like earthy tones, bright pops of color, or monochromatic schemes.
|
238 |
+
5. **Camera and Lens Settings**: Recommend camera models (e.g., Canon EOS R5, Sony Alpha 7R IV), lenses (e.g., 35mm f/1.8 for general scenes or 85mm for portraits), and techniques (e.g., shallow depth of field, long exposure for motion).
|
239 |
+
6. **Artistic Enhancements**: Suggest details like angles (e.g., bird’s-eye view, close-up), effects (e.g., bokeh, motion blur), or scene accents (e.g., props, textures, or natural elements).
|
240 |
7. **Aspect Ratio and Style Tags**: Specify dimensions (e.g., --ar 16:9 for banners or --ar 4:5 for Instagram). Include style tags like --style cinematic, --style raw, or --style editorial.
|
241 |
|
242 |
Examples:
|
243 |
+
1. A solitary hiker standing at the edge of a cliff overlooking a vast mountain range at sunrise. Warm, golden light bathes the scene, and a shallow depth of field highlights the hiker while keeping the horizon slightly blurred. Captured with a Sony Alpha 1 and a 24-70mm lens. --ar 16:9 --style cinematic
|
244 |
|
245 |
+
2. A cozy living room scene featuring a person relaxing on a sofa with a steaming mug of tea, surrounded by soft blankets and fairy lights. Gentle warm light from a nearby lamp enhances the feeling of comfort. Taken with a Canon EOS R6 and a 50mm f/1.4 lens. --ar 4:5 --style editorial
|
246 |
|
247 |
+
3. A bustling city street during golden hour, capturing pedestrians, cyclists, and the glow of sunlight reflecting off glass buildings. The composition emphasizes urban energy, with a wide-angle shot creating depth. Shot with a Nikon Z9 and a 24mm lens. --ar 16:9 --style candid
|
248 |
|
249 |
+
4. A flat-lay shot of an artist’s workspace, showcasing paintbrushes, vibrant palettes, and an unfinished canvas. The scene is styled with natural textures like wood and linen, and diffused sunlight streams through a nearby window. Shot with a Fujifilm X-T4 and a 35mm f/2 lens. --ar 1:1 --style clean
|
250 |
|
251 |
+
5. A serene close-up of dewdrops on a leaf at dawn, with soft focus highlighting the water droplets and delicate leaf veins. Captured in natural light using a macro lens for fine detail. Shot with a Canon EOS R5 and a 100mm macro lens. --ar 3:2 --style raw
|
|
|
|
|
252 |
|
253 |
"""
|
254 |
|