Wajahat698 commited on
Commit
1a6ee13
·
verified ·
1 Parent(s): 2314ec5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +57 -34
app.py CHANGED
@@ -2272,53 +2272,76 @@ def handle_prompt(prompt):
2272
  if any(keyword in prompt.lower() for keyword in ["blog", "write", "article", "annual report", "report", "newsletter", "news letter", "website introduction"]):
2273
  appended_instructions = (
2274
  "Craft a flawless, engaging, and fluid compelling copy using *non-flowery language* that reads as though written by a professional copywriter with 25 years of experience. "
2275
- "Avoid AI jargon, vague phrases, or overly formal language. Do not explicitly mention trust bucket names in headings or content. Instead, use the following enhanced guidelines for a polished, publication-ready copy that scores 10/10 in quality:"
2276
 
2277
- "1. **Interconnected Structure**: Ensure all sections and ideas are deeply interconnected with logical transitions between paragraphs. Build a cohesive narrative where each paragraph leads naturally into the next. Use linking phrases to reinforce connections (e.g., 'Building on this success...' or 'This aligns with our broader mission...'). Avoid isolated or disjointed sections."
 
 
 
 
2278
 
2279
- "2. **Tailored Formatting for Blogs and Newsletters**:"
2280
- "- **For Blogs**: Use detailed, narrative-style paragraphs to explore topics in depth. Each section must have a creative subheading summarizing the content."
2281
- "- **For Newsletters**: Focus on concise summaries with bullet points and clear headings. Ensure the content is visually digestible and quick to read."
 
 
2282
 
2283
- "3. **Seamless Integration of TrustBuilders®**: Naturally weave TrustBuilders® into the narrative without isolating them. Highlight their relevance subtly to build credibility and trust while maintaining readability and engagement."
 
 
2284
 
2285
- "4. **Relatable and Conversational Tone**: Engage the audience with a human, approachable tone. Avoid repetitive phrasing, overly technical explanations, or mechanical structures. Use active voice consistently for a professional yet friendly style."
 
 
 
2286
 
2287
- "5. **Audience-Centric Engagement**: Tailor the content to resonate with the audience’s needs, challenges, and aspirations. Use relatable examples, vivid imagery, and direct appeals to create emotional connections. Highlight actionable insights and practical relevance."
 
 
 
2288
 
2289
- "6. **Purpose-Driven Impact**: Clearly define and achieve the content's purpose—whether to inform, persuade, or inspire action. Ensure each paragraph contributes to the overall objective and reinforces the key message."
 
 
2290
 
2291
- "7. **Content Elements for Newsletters**:"
2292
- "- Use bullet points for key highlights or statistics to improve readability."
2293
- "- Summarize sections into digestible pieces that are easy to scan."
2294
- "- Add clear calls-to-action (e.g., 'Join us,' 'Learn more,' 'Donate now') at the end of relevant sections."
2295
 
2296
- "8. **Polished Presentation**: Refine the output to ensure it is professional, cohesive, and suitable for publication. Avoid ambiguity or errors. Structure the content to highlight key points effectively and keep the reader engaged."
 
 
 
2297
 
2298
- "9. **Mandatory Sections for Blogs and Newsletters**:"
2299
- "1. ##List of TrustBuilders Used: Provide TrustBuilders used with *Source links always.*"
2300
- "2. ##Heuristics and Creative Techniques:"
2301
- " - List them in a footnote-style small heading."
2302
- " - Use the following structure:"
2303
- " - Heuristics: Mention names only (e.g., social proof, authority, commitment)"
2304
- " - Creative Techniques: Mention names only (list only relevant marketing techniques without additional details)."
 
 
2305
 
2306
- "10. **Flow and Consistency**:"
2307
- "- Strengthen connections between paragraphs to create a seamless flow."
2308
- "- Ensure newsletters are concise, with key points prominently displayed, and blogs maintain a deeper narrative structure with smooth transitions."
 
2309
 
2310
- "11. **Creative Subheadings**:"
2311
- "- Each section must have a heading and subheading that captures the essence of the content below"
2312
- "- For example, instead of 'Empowering Communities,' use action-driven headlines like 'Empower no ing"
2313
- "- Avoid generic titles or -ing endings."
 
2314
 
2315
- "12. **Key Reminder**:"
2316
- "Ensure the final output:"
2317
- "- Is deeply interconnected, with transitions between sections creating a cohesive narrative."
2318
- "- Maintains a balance between detail and brevity to suit both blogs and newsletters."
2319
- "- Includes action-oriented subheadings and avoids disjointed or isolated content blocks."
2320
  )
2321
-
2322
 
2323
 
2324
 
 
2272
  if any(keyword in prompt.lower() for keyword in ["blog", "write", "article", "annual report", "report", "newsletter", "news letter", "website introduction"]):
2273
  appended_instructions = (
2274
  "Craft a flawless, engaging, and fluid compelling copy using *non-flowery language* that reads as though written by a professional copywriter with 25 years of experience. "
2275
+ "Avoid AI jargon, vague phrases, or overly formal language. Do not explicitly mention trust bucket names in headings or content. Instead, use the following enhanced guidelines for a polished, publication-ready copy that scores 10/10 in quality:\n\n"
2276
 
2277
+ "1. **Interconnected Structure**:\n"
2278
+ "- Ensure all sections and ideas are deeply interconnected with logical transitions between paragraphs.\n"
2279
+ "- Build a cohesive narrative where each paragraph leads naturally into the next.\n"
2280
+ "- Use linking phrases to reinforce connections (e.g., 'Building on this success...' or 'This aligns with our broader mission...').\n"
2281
+ "- Avoid isolated or disjointed sections.\n\n"
2282
 
2283
+ "2. **Tailored Formatting for Blogs and Newsletters**:\n"
2284
+ "- **For Blogs**: Use detailed, narrative-style paragraphs to explore topics in depth.\n"
2285
+ " - Each section must have a clear heading and a creative subheading summarizing the content.\n"
2286
+ "- **For Newsletters**: Focus on concise summaries with bullet points and clear headings.\n"
2287
+ " - Ensure the content is visually digestible and quick to read.\n\n"
2288
 
2289
+ "3. **Seamless Integration of TrustBuilders®**:\n"
2290
+ "- Naturally weave TrustBuilders® into the narrative without isolating them.\n"
2291
+ "- Highlight their relevance subtly to build credibility and trust while maintaining readability and engagement.\n\n"
2292
 
2293
+ "4. **Relatable and Conversational Tone**:\n"
2294
+ "- Engage the audience with a human, approachable tone.\n"
2295
+ "- Avoid repetitive phrasing, overly technical explanations, or mechanical structures.\n"
2296
+ "- Use active voice consistently for a professional yet friendly style.\n\n"
2297
 
2298
+ "5. **Audience-Centric Engagement**:\n"
2299
+ "- Tailor the content to resonate with the audience’s needs, challenges, and aspirations.\n"
2300
+ "- Use relatable examples, vivid imagery, and direct appeals to create emotional connections.\n"
2301
+ "- Highlight actionable insights and practical relevance.\n\n"
2302
 
2303
+ "6. **Purpose-Driven Impact**:\n"
2304
+ "- Clearly define and achieve the content's purpose—whether to inform, persuade, or inspire action.\n"
2305
+ "- Ensure each paragraph contributes to the overall objective and reinforces the key message.\n\n"
2306
 
2307
+ "7. **Content Elements for Newsletters**:\n"
2308
+ "- Use bullet points for key highlights or statistics to improve readability.\n"
2309
+ "- Summarize sections into digestible pieces that are easy to scan.\n"
2310
+ "- Add clear calls-to-action (e.g., 'Join us,' 'Learn more,' 'Donate now') at the end of relevant sections.\n\n"
2311
 
2312
+ "8. **Polished Presentation**:\n"
2313
+ "- Refine the output to ensure it is professional, cohesive, and suitable for publication.\n"
2314
+ "- Avoid ambiguity or errors.\n"
2315
+ "- Structure the content to highlight key points effectively and keep the reader engaged.\n\n"
2316
 
2317
+ "9. **Mandatory Sections for Blogs and Newsletters**:\n"
2318
+ "1. **List of TrustBuilders Used**:\n"
2319
+ " - Provide TrustBuilders used with *Source links always included*.\n"
2320
+ " - Example: 'Investment in sustainable development projects - [Source](https://example.com).'\n"
2321
+ "2. **Heuristics and Creative Techniques**:\n"
2322
+ " - List them in a footnote-style small heading.\n"
2323
+ " - Use the following structure:\n"
2324
+ " - Heuristics: Mention names only (e.g., social proof, authority, commitment).\n"
2325
+ " - Creative Techniques: Mention names only (list only relevant marketing techniques without additional details).\n\n"
2326
 
2327
+ "10. **Flow and Consistency**:\n"
2328
+ "- Strengthen connections between paragraphs to create a seamless flow.\n"
2329
+ "- Ensure newsletters are concise, with key points prominently displayed.\n"
2330
+ "- Blogs should maintain a deeper narrative structure with smooth transitions.\n\n"
2331
 
2332
+ "11. **Creative Subheadings**:\n"
2333
+ "- Each section must have a heading and subheading that captures the essence of the content below.\n"
2334
+ "- Example:\n"
2335
+ " - Instead of 'Empowering Communities,' use 'Transform Lives Through Sustainable Growth.'\n"
2336
+ "- Avoid generic titles or -ing endings.\n\n"
2337
 
2338
+ "12. **Key Reminder**:\n"
2339
+ "- Ensure the final output:\n"
2340
+ " - Is deeply interconnected, with transitions between sections creating a cohesive narrative.\n"
2341
+ " - Maintains a balance between detail and brevity to suit both blogs and newsletters.\n"
2342
+ " - Includes action-oriented subheadings and avoids disjointed or isolated content blocks.\n"
2343
  )
2344
+
2345
 
2346
 
2347