Spaces:
Sleeping
Sleeping
| story_to_prompt = ''' | |
| You are an expert in crafting vivid, cinematic prompts for image generation models like Midjourney, DALL·E, or Stable Diffusion. | |
| Given a paragraph describing a visual scene, rewrite it as a single, detailed sentence that captures the atmosphere, key visual elements, emotions, and composition — as if directing a high-quality cinematic image. | |
| Example input: | |
| "A bustling street scene sets the tone for a culinary journey, as the camera pans across the exterior of a cozy vegetarian restaurant, with the sign 'Vegetarian Delights' prominently displayed. The camera takes us inside, where the warm and inviting atmosphere is filled with the aroma of spices and the soft glow of lighting, highlighting the menu and the chefs expertly preparing a variety of vegetarian dishes. A satisfied customer takes a bite of their meal, with a look of delight on their face, as the camera zooms in on the flavors and textures of the dish, evoking a sense of joy and contentment." | |
| Desired output: | |
| "A cinematic street scene reveals the charming exterior of 'Vegetarian Delights,' then glides into a warmly lit, spice-scented interior where skilled chefs craft vibrant vegetarian dishes and a delighted diner savors each flavorful bite in glowing ambiance." | |
| ''' | |
| image_captioning_prompt = ''' | |
| Analyze the image deeply and give the story of the image what it potraits in just 50 words. | |
| ''' | |
| def initial_story_prompt(state): | |
| return f""" | |
| You are an expert video content strategist who generates the storyline of a video in exactly 300 words.. | |
| Your task is to generate a **detailed and creative storyline** for a promotional video on the **given topic**. The storyline should be structured, engaging, and highly relevant to the following **business details** and **inspiration from the image context if it contains some informations*. | |
| Another important thing is that you have to give the response focusing on the response of the tool provided to you. The tool contains the video stories and contents created by the influencers. | |
| Use that responses of tool for your reference. You can use your creativity but inside the boundary of tool's response. | |
| --- | |
| **Video Topic**: | |
| {state.topic} | |
| **Business Details**: | |
| {state.business_details} | |
| **Inspiration from Image Context** (must be strongly incorporated): | |
| {state.image_captions[-1]} | |
| --- | |
| 🎯 **Important Instructions**: | |
| - Creatively connect the image cues to make the storyline compelling. (If provided). | |
| - Structure the storyline logically (e.g., beginning, middle, end), showing what scenes or visuals to include. | |
| - Match the tone and depth to the business type (e.g., fun, luxurious, emotional, professional). | |
| Now, generate the final storyline for the video topic.. | |
| """ | |
| def refined_story_prompt(state): | |
| return f""" | |
| You are an expert video content strategist who generates the storyline of a video in exactly 300 words.. | |
| Your task is to generate a **detailed and creative storyline** for a promotional video on the **given topic**. The storyline should be structured, engaging, and highly relevant to the following **business details** , **preferred focus areas** and **inspiration from the image context(if any)**. | |
| Another important thing is that you have to give the response only focusing on the response of the tool provided to you. The tool contains the video stories and contents created by the influencers. | |
| Use that responses of tool for your reference. You can use your creativity but inside the boundary of tool's response. | |
| --- | |
| **Video Topic**: | |
| {state.topic} | |
| **Business Details**: | |
| {state.business_details} | |
| **Preferred Focus Areas** *(must be strongly incorporated)*: | |
| {state.preferred_topics[-1]} | |
| **Inspiration from Image Context** (must be strongly incorporated): | |
| {state.image_captions[-1]} | |
| --- | |
| 🎯 **Important Instructions**: | |
| - Creatively connect the preferred topics and image cues to make the storyline compelling. | |
| - Structure the storyline logically (e.g., beginning, middle, end), showing what scenes or visuals to include. | |
| - Match the tone and depth to the business type (e.g., fun, luxurious, emotional, professional). | |
| Now, generate the final storyline for the video topic.. | |
| """ | |
| def brainstroming_prompt(state): | |
| return f''' | |
| You are a creative consultant who can diversify the video's story for brainstorming. | |
| I have a detailed video story. I want to brainstorm creative ways to diversify or expand it into different directions. | |
| Please suggest 4 highly creative, diverse, and practical short sentence ideas that show how the story can be visually or narratively diversified. These should not be abstract "what if" scenarios, but specific ways to evolve or branch the storyline — such as adding new scenes, shifting perspectives, integrating emotional moments, or enhancing visual storytelling. | |
| Each idea should be a small sentence and propose a concrete way the video could take a new direction or include a compelling new element. | |
| For instance: If the storyline is about creating a promotional video for a restaurant, the brainstorming topics might include: | |
| - showcase the chef preparing a signature dish. | |
| - add a sequence of customers sharing their experiences at the restaurant. | |
| - highlight the farm-to-table sourcing of ingredients with a short segment showing local farms. | |
| - include a time-lapse of the restaurant transforming from day to night, capturing its unique ambiance. | |
| - feature a quick interview with the owner sharing the story behind the restaurant. | |
| **Remember**: Don't include the ideas or topics that are already presented in the video story. | |
| Now, here is the detailed video story: | |
| "{state.stories[-1]}" | |
| ''' | |
| def final_story_prompt(final_state): | |
| return( | |
| f''' | |
| I want to create a detailed storyline for a video in the given topic. You have to provide me that storyline what to include in the video.But the need is to generate the story focusing on the response of the tool provided to you.. | |
| Now, i am giving you the topic of the video. | |
| \n\n Now let's start creating the storyline for my topic. The topic of the video is: \n\n{final_state['topic']}\n\n | |
| **Final Reminder** You have to strongly focus on these topics while creating the storyline: {[item for sublist in final_state['preferred_topics'] for item in sublist]}''' | |
| ) | |