Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2217,25 +2217,115 @@ def handle_prompt(prompt):
|
|
| 2217 |
# Check if user request includes blog, article, or newsletter
|
| 2218 |
if any(keyword in prompt.lower() for keyword in ["blog","write", "article","report","annual report" "newsletter","news letter","website introduction"]):
|
| 2219 |
appended_instructions = (
|
| 2220 |
-
|
| 2221 |
-
|
| 2222 |
-
"
|
| 2223 |
-
|
| 2224 |
-
|
| 2225 |
-
|
| 2226 |
-
|
| 2227 |
-
|
| 2228 |
-
|
| 2229 |
-
|
| 2230 |
-
|
| 2231 |
-
|
| 2232 |
-
|
| 2233 |
-
|
| 2234 |
-
|
| 2235 |
-
|
| 2236 |
-
|
| 2237 |
-
|
| 2238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2239 |
else:
|
| 2240 |
appended_instructions = ""
|
| 2241 |
final_prompt = f"{prompt} {base_instructions} {appended_instructions}"
|
|
|
|
| 2217 |
# Check if user request includes blog, article, or newsletter
|
| 2218 |
if any(keyword in prompt.lower() for keyword in ["blog","write", "article","report","annual report" "newsletter","news letter","website introduction"]):
|
| 2219 |
appended_instructions = (
|
| 2220 |
+
|
| 2221 |
+
|
| 2222 |
+
"""
|
| 2223 |
+
**"Craft flawless, engaging, and fluid content using *non-flowery language* that reads as though written by a professional marketing copywriter with 25 years of experience. Avoid AI jargon, vague expressions, or overly formal language. Follow these enhanced guidelines to ensure the output scores 10/10 in quality, regardless of the format requested."**
|
| 2224 |
+
|
| 2225 |
+
---
|
| 2226 |
+
|
| 2227 |
+
## **General Guidelines for All Formats**
|
| 2228 |
+
|
| 2229 |
+
1. **Seamless Flow (Critical for All Formats)**
|
| 2230 |
+
- Every paragraph must connect logically to the previous one and transition naturally into the next.
|
| 2231 |
+
- Use linking phrases like "Building on this..." or "This aligns with..." to reinforce the narrative's interconnectedness.
|
| 2232 |
+
- Ensure no standalone or disjointed sections; the content should flow as one cohesive story.
|
| 2233 |
+
|
| 2234 |
+
2. **Tailored Formats**
|
| 2235 |
+
- **For Blogs/Articles**:
|
| 2236 |
+
- Write detailed, narrative-style paragraphs that explore topics in depth.
|
| 2237 |
+
- Use creative subheadings summarizing each section.
|
| 2238 |
+
- Maintain a conversational yet authoritative tone ("we").
|
| 2239 |
+
- **For Newsletters**:
|
| 2240 |
+
- Use concise paragraphs and bullet points for easy readability.
|
| 2241 |
+
- Focus on quick summaries with action-driven headlines.
|
| 2242 |
+
- Use "you/your" to directly engage the reader and include clear calls-to-action (CTAs) (e.g., "Join us now," "Learn more").
|
| 2243 |
+
|
| 2244 |
+
3. **Dynamic Headlines and Subheadings**
|
| 2245 |
+
- Create active, action-oriented headlines summarizing the content below (e.g., "Transform Lives Today" rather than "Transforming Lives").
|
| 2246 |
+
- Avoid generic titles or "-ing" endings. Headlines should inspire curiosity and guide the reader through the content.
|
| 2247 |
+
|
| 2248 |
+
4. **Relatable, Audience-Centric Tone**
|
| 2249 |
+
- Address the audience directly ("you") to make the content feel personal, especially in newsletters.
|
| 2250 |
+
- Tailor the content to the audience's needs, challenges, and aspirations.
|
| 2251 |
+
- Use vivid imagery, relatable examples, and emotional appeals to create engagement.
|
| 2252 |
+
|
| 2253 |
+
5. **Purpose-Driven Impact**
|
| 2254 |
+
- Define and achieve the content’s purpose—whether to inform, persuade, or inspire action.
|
| 2255 |
+
- Ensure each paragraph contributes to the overall objective while reinforcing the key message.
|
| 2256 |
+
|
| 2257 |
+
6. **Polished and Professional Presentation**
|
| 2258 |
+
- Deliver error-free, well-structured content with visually appealing layouts.
|
| 2259 |
+
- Ensure concise paragraphs and bullet points highlight key statistics or achievements.
|
| 2260 |
+
|
| 2261 |
+
---
|
| 2262 |
+
|
| 2263 |
+
## **Mandatory Guidelines for Newsletters**
|
| 2264 |
+
|
| 2265 |
+
1. **Newsletter-Specific Formatting**
|
| 2266 |
+
- Use short, impactful paragraphs or bullet points to improve readability.
|
| 2267 |
+
- Ensure content is visually digestible, with clear section breaks and prominent CTAs.
|
| 2268 |
+
- Example CTA: "Be the hope they need—donate today."
|
| 2269 |
+
|
| 2270 |
+
2. **TrustBuilder Integration**
|
| 2271 |
+
- Weave TrustBuilders® naturally into the narrative without isolating them.
|
| 2272 |
+
- Highlight relevance subtly while maintaining readability.
|
| 2273 |
+
|
| 2274 |
+
3. **Mandatory Sections for Newsletters**
|
| 2275 |
+
- **Engaging Opening**: Start with a compelling hook to draw the reader in.
|
| 2276 |
+
- Example: "Imagine transforming the life of a child in need—your support can make this possible."
|
| 2277 |
+
- **Highlight Initiatives**: Summarize key programs, achievements, and their impacts.
|
| 2278 |
+
- Example Headline: "Empowering Communities Through Early Education"
|
| 2279 |
+
- **Leadership and Success Stories**: Highlight leadership contributions or personal stories that inspire confidence.
|
| 2280 |
+
- Example Headline: "Driving Change with Strategic Leadership"
|
| 2281 |
+
- **Clear Call-to-Action**: End with a powerful CTA that encourages immediate reader engagement.
|
| 2282 |
+
4. **Headlines**:
|
| 2283 |
+
- Give active language main headline and sub headlines with paragraphs, should be creative.
|
| 2284 |
+
---
|
| 2285 |
+
|
| 2286 |
+
## **Mandatory Guidelines for Blogs and Articles**
|
| 2287 |
+
|
| 2288 |
+
1. **Blog/Article-Specific Formatting**
|
| 2289 |
+
- Use in-depth, narrative-style paragraphs to explore topics comprehensively.
|
| 2290 |
+
- Ensure each section begins with a creative subheading summarizing its content.
|
| 2291 |
+
- Focus on storytelling techniques to maintain reader interest.
|
| 2292 |
+
|
| 2293 |
+
2. **Detailed Content Elements**
|
| 2294 |
+
- Include real-world examples and data to support claims.
|
| 2295 |
+
- Use actionable insights to provide value to the reader.
|
| 2296 |
+
|
| 2297 |
+
3. **Interconnected Narrative**
|
| 2298 |
+
- Ensure every paragraph connects logically to the previous one, building a seamless flow throughout.
|
| 2299 |
+
- Use phrases like "Building on this success..." to maintain cohesiveness.
|
| 2300 |
+
4. **Headlines**:
|
| 2301 |
+
- Give active language main headline and sub headlines with each paragraphs, should be creative.
|
| 2302 |
+
---
|
| 2303 |
+
|
| 2304 |
+
## **Key Components for All Formats**
|
| 2305 |
+
|
| 2306 |
+
1. **TrustBuilders and Techniques**
|
| 2307 |
+
- **List of TrustBuilders Used**: Provide TrustBuilders used in a separate section, with accurate and properly formatted source links.
|
| 2308 |
+
- **Heuristics and Creative Techniques**: Add in footnote style:
|
| 2309 |
+
- **Heuristics**: Mention names only (e.g., Social Proof, Authority, Commitment).
|
| 2310 |
+
- **Creative Techniques**: Mention names only (e.g., Storytelling, Emotional Appeal).
|
| 2311 |
+
|
| 2312 |
+
2. **Creative Headlines and Subheadings**
|
| 2313 |
+
- Use dynamic, action-driven headlines to engage the reader.
|
| 2314 |
+
- Example: "Empowering Early Childhood Development" or "Creating Brighter Futures for Vulnerable Communities."
|
| 2315 |
+
|
| 2316 |
+
3. **Actionable CTAs**
|
| 2317 |
+
- Include CTAs that inspire action at the end of relevant sections.
|
| 2318 |
+
- Example: "Join us now to create a lasting impact."
|
| 2319 |
+
|
| 2320 |
+
---
|
| 2321 |
+
|
| 2322 |
+
## **Critical Reminders**
|
| 2323 |
+
|
| 2324 |
+
- Strengthen connections between paragraphs to create a seamless flow.
|
| 2325 |
+
- Balance brevity and detail to suit the format (blogs/articles for depth, newsletters for quick summaries).
|
| 2326 |
+
- Maintain a cohesive tone and structure across all formats.
|
| 2327 |
+
""" )
|
| 2328 |
+
|
| 2329 |
else:
|
| 2330 |
appended_instructions = ""
|
| 2331 |
final_prompt = f"{prompt} {base_instructions} {appended_instructions}"
|