Wajahat698 commited on
Commit
033de81
·
verified ·
1 Parent(s): ef87a1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +109 -19
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
- "Craft a flawless, engaging, and fluid compelling copy using *non-flowery language* that reads as though written by a professional copywriter having 25 years of experience. "
2221
- "Do not use AI jargon, vague phrases, or formal language.Donot mention trustbucket names in the headings and content. Follow these enhanced guidelines to ensure a polished, publication-ready copy with a 10/10 quality: "
2222
- "1. **Interconnected Structure**: Ensure all sections and ideas flow seamlessly with logical transitions between paragraphs. Build a cohesive narrative where every part supports the overall theme, reinforcing the message at every step. "
2223
- "3. **Seamless Integration of TrustBuilders®**: Naturally incorporate TrustBuilders® into the narrative without isolating or explicitly listing them in the main body. Instead, weave them fluidly into sentences to build credibility and trust while maintaining the content’s readability and engagement. "
2224
- "4. **Human Tone**: Write in a relatable, conversational tone that engages the reader and feels natural. Avoid repetitive phrasing, overly technical explanations, or mechanical structures. Use active voice consistently, ensuring the tone is both approachable and professional."
2225
- "5. **Audience-Centric Engagement**: Tailor the content to meet the audience's needs, goals, and challenges. Create emotional connections by using relatable examples, vivid imagery, and direct appeals. Emphasize actionable insights and practical relevance to ensure the audience feels seen and understood."
2226
- "6. **Enhanced Audience Engagement**: Use storytelling techniques and mix the trustbuilders into a content. Begin with a compelling hook, maintain momentum through transitions, and conclude with a strong call-to-action that inspires the reader to act or reflect. "
2227
- "7. **Purpose-Driven Impact**: Clearly define and achieve the content’s purpose—whether to inform, persuade, or inspire action. Ensure every paragraph serves the overall objective while reinforcing the key message. "
2228
- "8. **Polished Presentation**: Ensure the final output is refined, professional, and suitable for publication. The copy should demonstrate mastery of language and content design, leaving no room for ambiguity or errors. "
2229
- "dont give source link in content"
2230
- "1. ##List of TrustBuilders Used: Provide trustbuilders used followed by *Source links always*"
2231
- " 2. ##Heuristics and Creative Techniques :"
2232
- " -List them in a footnote-style small heading."
2233
- " Use the following structure:"
2234
- " -Heuristics: Mention names only like examples (e.g., social proof, authority, commitment)."
2235
- " -Creative Techniques: Mention names onlyexamples (list only relevant marketing techniques without additional details)."
2236
- "The final output must not include AI jargons. *With every paragraph give a creative headline that summarises the content give sub-headlines with each paragraph like example headline: Drive,empower use similar words but no driving, empowering etc *. Avoid mentioning trustbucket names."
2237
- "MOST IMPORTANT RULE. IN EVERY PARAGRAPH Strengthen the connections between sections to ensure smoother flow and SHOULD BE DEEPLY INTERCONNECTED WITH EACH OTHER TO CREATE A SEAMLESS FLOW, MAKING THE CONTENT READ LIKE A SINGLE CONTENT RATHER THAN DISJOINTED PARAGRAPHS OR INDEPENDENT BLOG SECTIONS. EACH SECTION MUST LOGICALLY TRANSITION INTO THE NEXT, ENSURING THAT THE TOPIC REMAINS CONSISTENT AND RELEVANT THROUGHOUT. BY MAINTAINING A COHESIVE STRUCTURE, THE ARTICLE WILL ENGAGE READERS MORE EFFECTIVELY, HOLDING THEIR ATTENTION AND CONVEYING THE INTENDED MESSAGE WITH CLARITY AND IMPACT."
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}"