Dash-inc commited on
Commit
f633af6
·
verified ·
1 Parent(s): f2b1bb2

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +12 -14
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 child-care blog. Each prompt should be meticulously detailed, emotionally engaging, and tailored to support the blog's themes.
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), including age-appropriate details for child-care contexts. Highlight moments such as family activities, playtime, or nurturing interactions.
235
- 2. **Composition and Action**: Describe spatial arrangements, depth, and active storytelling moments. For example, a parent reading to a child on a sofa, or kids painting with watercolors.
236
- 3. **Emotion and Style**: Convey a mood or artistic style (e.g., natural, editorial, cinematic). Emphasize emotional moments, like laughter, tenderness, or curiosity.
237
- 4. **Lighting and Color**: Use lighting to enhance the tone, such as soft natural light, golden hour hues, or warm indoor lighting. Specify color palettes to suit the scene, like muted pastels or vibrant, cheerful tones.
238
- 5. **Camera and Lens Settings**: Recommend camera models (e.g., Canon EOS R5, Nikon Z9), lenses (e.g., 50mm f/1.8 for portraits or 85mm for close-ups), and techniques (e.g., shallow depth of field, macro for texture).
239
- 6. **Artistic Enhancements**: Suggest details like angles (e.g., low-angle, top-down), effects (e.g., bokeh, soft focus), or scene accents (e.g., props or natural textures).
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 young child sitting cross-legged on a soft, textured playmat surrounded by vibrant building blocks and a teddy bear. The child’s expression is one of intense focus, with soft natural light streaming through a nearby window. Captured with a Canon EOS R5 and a 50mm f/1.4 lens, achieving a shallow depth of field. Gentle pastel tones dominate the color palette. --ar 4:5 --style editorial
244
 
245
- 2. A warm, candid moment of a father holding his giggling infant high above his head in a softly lit living room. The golden-hour sunlight filters through sheer curtains, casting a warm glow. Captured with a Nikon Z8 and an 85mm f/1.8 lens for sharp focus on the subjects and dreamy background blur. --ar 16:9 --style cinematic
246
 
247
- 3. A minimalist overhead shot of a child’s lunchbox, carefully arranged with colorful fruits, sandwiches, and snacks. The scene is styled with muted pastel plates and a light wood table surface. Shot using a Sony Alpha 7R IV and a 35mm f/2.8 lens to emphasize textures and balance. --ar 1:1 --style clean
248
 
249
- 4. A toddler in a cheerful yellow raincoat, splashing in a puddle on a rainy afternoon. Raindrops glisten in soft focus as the child’s joyful expression is captured mid-motion. Diffuse gray lighting enhances the wet environment while bright accents bring life to the scene. Taken with a Canon EOS R3 and a 70-200mm lens. --ar 3:2 --style candid
250
 
251
- 5. A close-up of a mother’s hands gently holding her newborn’s tiny fingers. The shallow depth of field blurs the background, focusing on the textures of skin and soft baby clothes. Captured in warm indoor light using a Fujifilm GFX 100S with a 110mm macro lens. --ar 4:5 --style raw
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