aidn commited on
Commit
28877a5
Β·
verified Β·
1 Parent(s): bbca8de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -24
app.py CHANGED
@@ -75,31 +75,32 @@ Rules:
75
  - verdict is one precise sentence in German, max 12 words. Acknowledge substance if present.
76
  - ALL string values must be valid JSON strings."""
77
 
78
- # HIER IST DER NEUE ENGLISCHE PROMPT FÜR BESSERE SPRACH-KONTROLLE BEI LLAMA 4
79
- PROMPT_AI_TUNING = """You are an elite LinkedIn copywriter and content optimizer. Your task is to rewrite the provided post strictly according to the tuning parameters.
80
-
81
- CRITICAL RULE:
82
- You MUST output the text in the EXACT SAME LANGUAGE as the original post.
83
- - If the input is English, output MUST be English.
84
- - If the input is German, output MUST be German.
85
- Never translate the post!
86
-
87
- TUNING PARAMETERS:
88
- - Tone: {ton}/100 (0 = highly professional/corporate, 100 = provocative/bold/loud)
89
- - Substance: {substanz}/100 (0 = pure storytelling/emotional, 100 = hard facts/data/insights only)
90
- - Length: {laenge}/100 (0 = extremely short/1-2 sentences, 100 = very detailed/long)
91
  - Target Audience: {zielgruppe}
92
- - Call to Action Goal: {cta}
93
-
94
- EXECUTION RULES:
95
- - Treat the parameters (0-100) as absolute constraints. If Length is < 20, the post MUST be tiny. If Substance is > 80, strip ALL fluff and keep only hard facts.
96
- - Remove generic "LinkedIn Bingo" phrases.
97
- - Maintain the core message and all links/metrics from the original.
98
- - If the output is German, ALWAYS use the informal "Du", never "Sie".
99
- - Format using Markdown.
100
-
101
- Output ONLY the optimized post. No preamble, no explanations."""
102
-
 
103
 
104
  # ── HF Dataset Persistenz ──────────────────────────────────────────────────────
105
 
 
75
  - verdict is one precise sentence in German, max 12 words. Acknowledge substance if present.
76
  - ALL string values must be valid JSON strings."""
77
 
78
+ PROMPT_AI_TUNING = """You are a top-tier Ghostwriter for Tech Executives and a master of LinkedIn algorithms. Your task is to rewrite the provided text into a high-performing LinkedIn post based STRICTLY on the tuning parameters.
79
+
80
+ CRITICAL LANGUAGE RULE:
81
+ - The output MUST be in the EXACT SAME LANGUAGE as the original text. Never translate!
82
+ - If the output is German: ALWAYS use the informal "Du", never "Sie".
83
+
84
+ TUNING PARAMETERS & HOW TO APPLY THEM:
85
+ - Tone: {ton}/100
86
+ (0-30: Highly corporate, academic, serious. 31-70: Conversational, confident expert. 71-100: Bold, contrarian, punchy, slightly provocative.)
87
+ - Substance: {substanz}/100
88
+ (0-30: Focus on emotions, storytelling, the "journey" and people. 31-70: Balanced case study or insights. 71-100: Brutally analytical, hard facts, frameworks, numbers, zero fluff.)
89
+ - Length: {laenge}/100
90
+ (0-30: Twitter/X-style, extremely concise, 2-4 lines max. 31-70: Standard post, 2-3 short paragraphs. 71-100: Deep-dive mini-essay, highly structured with bullet points.)
91
  - Target Audience: {zielgruppe}
92
+ (Strictly adapt vocabulary, complexity, and inside jokes to this specific group)
93
+ - Call to Action: {cta}
94
+ (Integrate this organically at the very end)
95
+
96
+ RULES FOR "ELITE" QUALITY:
97
+ 1. The Hook: Sentence 1 MUST be a scroll-stopper. Short, punchy, or a counter-intuitive statement. No boring introductions.
98
+ 2. Formatting: Use line breaks strategically. Nobody reads text walls on mobile. Use bolding (**text**) sparingly for core concepts only.
99
+ 3. Banned Words: NEVER use AI-typical fluff like "In today's fast-paced world", "Unlock the power of", "Delve", "Crucial", or "Game-changer". Keep emojis minimal unless Tone is > 50.
100
+ 4. Authenticity: Sound like a real, battle-tested professional. If Substance is high, prove it with structure.
101
+
102
+ Output ONLY the final optimized post. No preamble, no meta-commentary, no markdown fences around the response
103
+ ."""
104
 
105
  # ── HF Dataset Persistenz ──────────────────────────────────────────────────────
106