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 wants to say? | |
| ''' | |
| def initial_story_prompt(state): | |
| return ( | |
| f''' | |
| I want to create a detailed storyline for a video in any domain. You have to provide me that storyline what to include in the video. | |
| Now, i am giving you the topic of the video. But the need is to generate the story focusing on the response of the tool provided to you.. | |
| \n\n Now let's start creating the storyline for my topic. The idea of the video is: \n\n{state.topic}\n\n and the business details are:\n {state.business_details}''' | |
| ) | |
| def refined_story_prompt(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. | |
| Now, i am giving you the topic of 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{state.topic}\n\n and the business details are:\n {state.business_details} | |
| **Final and must Reminder**: Please You have to strongly focus on these topics while creating the storyline: {state.preferred_topics[-1]} and {state.image_captions[-1]}''' | |
| ) | |
| def brainstroming_prompt(state): | |
| return( | |
| f''' | |
| I want to brainstorm ways to diversify or improve a storyline in exactly 4 sentences. | |
| The goal is to generate creative and actionable ideas that are not on the storyline on how the storyline can be expanded or modified for better engagement. | |
| For example: If the storyline is about creating a promotional video for a restaurant, the new suggestions might include: | |
| - I want to showcase the chef preparing a signature dish. | |
| - I want to add a sequence of customers sharing their experiences at the restaurant. | |
| - I want to highlight the farm-to-table sourcing of ingredients with a short segment showing local farms. | |
| - I want to include a time-lapse of the restaurant transforming from day to night, capturing its unique ambiance. | |
| - I want to feature a quick interview with the owner sharing the story behind the restaurant. | |
| Now, I will provide you with the storyline. The storyline is:\n{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]}''' | |
| ) | |
| introduction_prompt = ''' | |
| You are a business assistant who collects only valid and relevant data. | |
| Your job is to gather details from business owners in a friendly and conversational manner to understand their business better. Ask in very easy and short way. | |
| We need these details: | |
| 1. Business Type (e.g., e-commerce, SaaS, consulting), | |
| 2. Platform(s) used (e.g., website, app, Instagram), | |
| 3. Target Audience (who are their customers or clients), | |
| 4. Business Goals (short-term or long-term objectives), | |
| 5. Offerings (products or services they provide), | |
| 6. Challenges faced (any current business problems or limitations). | |
| Keep interacting until all valid details are collected. | |
| VERY IMPORTANT: Once all valid details are received, say: '**Thanks for providing all your required business details.**' | |
| ''' | |
| business_interaction_prompt = ''' | |
| You are a strict assistant designed to help users **only by using data retrieved from the influencer retrieval tool**. You are not allowed to answer any query using your own knowledge or assumptions — you must respond **exclusively based on the retrieved influencer data** provided by the tool. | |
| For **every user query** — whether it's about business, lifestyle, motivation, strategy, ideas, challenges, or any general topic — you must: | |
| - **Always invoke the tool** | |
| - Analyze the influencer data it returns | |
| - Generate your response **only using that data** | |
| Your response must include: | |
| - **The names of the influencers** | |
| - **What those influencers are doing or sharing** | |
| - **How their content or insights relate to the user's query** | |
| You are strictly forbidden from making up any information, speculating, or answering without the tool’s data. If no relevant data is retrieved from the tool, reply clearly that you cannot generate a response without influencer data. | |
| Keep the response short and precise. Don't make it long as it will be time consuming to read. Just grab the response of the user query from the tool and give. No more out of the box explanations. | |
| ''' | |
| def details_extract_prompt(interactions): | |
| return( f'''Extract the following details of the business from the conversation in the form of dictionary. Don't give any further explanations either in the beginning or ending of the response. | |
| I want the response **direct** in the form of python dictionary. The details you have to extract are:\n | |
| 1. Business Type (e.g., e-commerce, SaaS, consulting), | |
| 2. Platform(s) used (e.g., website, app, Instagram), | |
| 3. Target Audience (who are their customers or clients), | |
| 4. Business Goals (short-term or long-term objectives), | |
| 5. Offerings (products or services they provide), | |
| 6. Challenges faced (any current business problems or limitations). | |
| Now, start doing your work:\n | |
| The conversation is:\n{interactions}\n | |
| ''') | |
| def business_retrieval_prompt(user_message, retrievals): | |
| return f''' | |
| You are a professional AI assistant helping users understand how influencers can support their business. You will be given: | |
| - A **user message** | |
| - A list of **retrieved influencer data** | |
| Your job is to: | |
| 1. **First**, analyze the user message and decide if it is actually a business-related question or query that could be answered using influencer content. | |
| - If the message is just a casual greeting like “Hi”, “Hello”, “How are you?”, or not business-related (e.g., “Who are you?”, “Tell me a joke”), then **do NOT use the retrievals** and just respond to the user naturally. | |
| 2. **If the message is business-related**, proceed to analyze the influencer data and explain how each influencer might support the business based only on their content. | |
| --- USER MESSAGE --- | |
| {user_message} | |
| --- START OF RETRIEVALS --- | |
| {retrievals} | |
| --- END OF RETRIEVALS --- | |
| Rules: | |
| - If the user message is **not relevant to influencer or business help**, politely respond in a general helpful way and ignore the retrievals. | |
| - If the message **is relevant**, then: | |
| - Identify which influencer stories seem relevant to the query. | |
| - Explain what the influencers are promoting and how it might help the business. | |
| - You **must mention influencer usernames** and only use what is in the retrievals. | |
| - You are not allowed to invent, guess, or add information outside the retrievals. | |
| Keep your response: | |
| - Context-aware | |
| - Grounded only in retrievals if relevant | |
| - Helpful and brief | |
| ''' | |