Wajahat698 commited on
Commit
fa0a92a
·
verified ·
1 Parent(s): 6972eed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -15
app.py CHANGED
@@ -2234,42 +2234,43 @@ def handle_prompt(prompt):
2234
 
2235
 
2236
  # Check if user request includes blog, article, or newsletter
2237
- if any(keyword in prompt.lower() for keyword in ["blog", "write","article","annual report","report", "newsletter","news letter ","website introduction"]):
2238
  appended_instructions = (
2239
  "Craft a flawless, engaging, and fluid marketing copy using *non-flowery language* that reads as though written by a seasoned marketing copywriter with 25 years of experience. "
2240
  "Avoid AI jargon, vague expressions, or overly formal language. Omit any mention of trustbucket names in headings or content. Adhere to these enhanced guidelines for a polished, publication-ready output with a 10/10 quality rating: "
2241
 
2242
  "**Content Format**: Use 'you' or 'your' for newsletters to create a personal connection. Avoid distant references like 'they' or 'them.' In articles, blogs, or reports, use 'we' to reflect organizational authority. Always tailor the tone to the appropriate format. "
2243
 
2244
- "**Action-Oriented Headlines**: Each section must begin with a headline or subheading in active language, avoiding '-ing' endings. Headlines should directly address the reader, summarize the paragraph’s main idea, and offer a clear benefit or outcome (e.g., 'You Drive Sustainable Development' rather than 'Driving Sustainable Development'). "
2245
 
2246
- "**Seamless Transitions Between Sections**: Ensure every section naturally builds on the previous one. Use linking phrases and references that maintain a unified theme, avoiding standalone or disjointed paragraphs. "
2247
 
2248
- "**1. Interconnected Structure**: Write in a cohesive, paragraph-based narrative with minimal bullet points. Each paragraph must logically connect to the previous paragraph, reinforcing a single overarching message. "
2249
 
2250
- "**2. TrustBuilders® Integration**: Weave TrustBuilders® organically into sentences that highlight credibility and impact. Do not list them separately in the main text; instead, incorporate them in context to maintain readability and flow. "
2251
 
2252
- "**3. Human Tone**: Adopt a relatable, conversational style. Use active voice consistently, and avoid technical jargon or repetitive phrasing. The goal is to sound approachable, professional, and clear. "
2253
 
2254
- "**4. Audience-Centric Approach**: Place the reader’s needs, aspirations, and challenges at the forefront. Use vivid imagery, relatable examples, and direct appeals to evoke an emotional response and show practical relevance. "
2255
 
2256
- "**5. Storytelling Focus**: Begin with a captivating hook that draws the reader in. Sustain momentum by providing real-life examples or scenarios, and end with a powerful call-to-action (CTA) that invites the reader to take the next step. "
2257
 
2258
- "**6. Purpose and Objective**: Clearly define whether the piece aims to inform, persuade, or inspire. Each paragraph should support this purpose, echoing the key message or theme. "
2259
 
2260
- "**7. Polished Presentation**: Deliver an error-free, professional piece demonstrating advanced language skills, layout, and readability. Headlines, subheadings, and paragraphs should be cohesive and visually inviting. "
2261
 
2262
- "**8. Engaging Headlines**: Use direct, benefit-driven headlines that showcase what the reader stands to gain or how they can contribute. Avoid generic slogans like 'Empowering Change' without backing them up with specifics or vivid detail. "
2263
 
2264
  "**9. TrustBuilders and Techniques**: "
2265
- " - Provide a **List of TrustBuilders Used** separately, each with a properly formatted source link. "
2266
- " - Include a **Heuristics and Creative Techniques** section in footnote style. "
2267
  " - Heuristics: List names only, such as 'social proof,' 'authority,' or 'commitment.' "
2268
- " - Creative Techniques: List only relevant marketing techniques (e.g., 'storytelling,' 'vivid imagery') without extra details. "
2269
 
2270
- "**MOST IMPORTANT RULE**: Every paragraph and section should flow together as one cohesive narrative, ensuring the content reads smoothly from start to finish. Use direct address ('you') for newsletters, create strong transitions, and maintain a single, unified theme that captures and holds the reader’s attention."
2271
  )
2272
 
 
2273
  appended_instructions = ""
2274
  final_prompt = f"{prompt} {base_instructions} {appended_instructions}"
2275
 
 
2234
 
2235
 
2236
  # Check if user request includes blog, article, or newsletter
2237
+ if any(keyword in prompt.lower() for keyword in ["blog", "write", "article", "annual report", "report", "newsletter", "news letter ", "website introduction"]):
2238
  appended_instructions = (
2239
  "Craft a flawless, engaging, and fluid marketing copy using *non-flowery language* that reads as though written by a seasoned marketing copywriter with 25 years of experience. "
2240
  "Avoid AI jargon, vague expressions, or overly formal language. Omit any mention of trustbucket names in headings or content. Adhere to these enhanced guidelines for a polished, publication-ready output with a 10/10 quality rating: "
2241
 
2242
  "**Content Format**: Use 'you' or 'your' for newsletters to create a personal connection. Avoid distant references like 'they' or 'them.' In articles, blogs, or reports, use 'we' to reflect organizational authority. Always tailor the tone to the appropriate format. "
2243
 
2244
+ "**Dynamic and Action-Oriented Headlines**: Each section must begin with an engaging headline or subheading in active language, avoiding '-ing' endings. Headlines should reflect the paragraph’s main idea, offering a benefit or outcome (e.g., 'Expand Your Impact Today' instead of 'Expanding Impact'). Headlines should immediately capture the reader's interest and maintain relevance to the theme. "
2245
 
2246
+ "**Seamless Transitions**: Ensure each section logically builds on the previous one. Use transitional phrases and references that maintain a unified theme, avoiding standalone or fragmented paragraphs. Create a natural flow by linking ideas and reinforcing the core message. "
2247
 
2248
+ "**1. Unified Narrative Structure**: Write in cohesive, paragraph-based narratives with minimal bullet points. Each paragraph should connect seamlessly to the next, supporting a single overarching theme or purpose. Avoid disjointed sections. "
2249
 
2250
+ "**2. TrustBuilders® Integration**: Weave TrustBuilders® naturally into the narrative by embedding them in sentences that demonstrate impact and credibility. Do not list them in the main text; instead, integrate them contextually to enhance readability and engagement. "
2251
 
2252
+ "**3. Relatable and Human Tone**: Write in an approachable, conversational style. Use active voice and avoid overly technical jargon or mechanical structures. The tone should be professional yet relatable, fostering trust and engagement. "
2253
 
2254
+ "**4. Audience-Centric Appeal**: Prioritize the reader’s needs, challenges, and aspirations. Use vivid imagery, relatable examples, and direct appeals to evoke emotional responses. Ensure the content feels relevant and valuable to the target audience. "
2255
 
2256
+ "**5. Storytelling Excellence**: Begin with a compelling hook to draw readers in. Sustain momentum by integrating real-life examples or scenarios, and conclude with a strong, actionable CTA that invites the reader to take the next step. "
2257
 
2258
+ "**6. Clear Objectives**: Define the content’s purpose—whether to inform, persuade, or inspire. Each paragraph must align with and reinforce this purpose, maintaining consistency throughout the piece. "
2259
 
2260
+ "**7. Polished and Professional Presentation**: Deliver a clean, error-free final output. Ensure advanced language use, visual clarity, and structured readability through cohesive headings, subheadings, and well-organized paragraphs. "
2261
 
2262
+ "**8. Impactful Headlines**: Use direct, benefit-driven headlines that clearly convey what the reader stands to gain or how they can contribute. Avoid generic or vague phrases like 'Driving Change' unless paired with specific, vivid outcomes. "
2263
 
2264
  "**9. TrustBuilders and Techniques**: "
2265
+ " - Provide a **List of TrustBuilders Used** in a separate section, with accurate and properly formatted source links. "
2266
+ " - Include a **Heuristics and Creative Techniques** section in footnote style: "
2267
  " - Heuristics: List names only, such as 'social proof,' 'authority,' or 'commitment.' "
2268
+ " - Creative Techniques: Mention only relevant marketing techniques (e.g., 'storytelling,' 'vivid imagery'). "
2269
 
2270
+ "**CRITICAL RULE**: Every paragraph and section must flow together as part of a single, cohesive narrative. Avoid isolated or standalone paragraphs. Maintain logical transitions and strong thematic connections throughout the content. For newsletters, use 'you' to establish a personal tone. Keep the theme unified and compelling, ensuring the piece engages and holds the reader’s attention while delivering a clear and impactful message."
2271
  )
2272
 
2273
+
2274
  appended_instructions = ""
2275
  final_prompt = f"{prompt} {base_instructions} {appended_instructions}"
2276