mroccuper commited on
Commit
47cfce2
·
verified ·
1 Parent(s): 9758d74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -69
app.py CHANGED
@@ -1,4 +1,3 @@
1
-
2
  import gradio as gr
3
  import google.generativeai as genai
4
  import os
@@ -17,46 +16,35 @@ load_dotenv()
17
  DEFAULT_TEMPLATES = {
18
  "fermentation": """
19
  Act as an elite-level SEO strategist and content creator with deep expertise in food blogs, particularly fermentation. I run a blog about fermentation, and my primary goal is to increase organic traffic, educate beginners, and establish thought leadership. My target audience is beginners curious about home fermentation and health-conscious individuals.
20
-
21
  For the specific topic: '{topic}'
22
-
23
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
24
-
25
  I require the following, formatted in clean markdown:
26
-
27
  1. **Strategic Keyword Analysis:**
28
  * **Primary Target Keyword:**
29
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
30
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
31
  * **Semantic/LSI Keywords:** 5-7 contextually related terms.
32
  * **Search Intent Analysis:** (Informational, Commercial, etc.)
33
-
34
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
35
  * For each:
36
  * URL
37
  * Strengths
38
  * Weaknesses
39
  * Content angle/hook
40
-
41
  3. **Content Gaps & Unique Value Proposition:**
42
  * Missing topics or angles
43
  * Unique insights or differentiators for *my* blog
44
-
45
  4. **Optimized Blog Post Outline:**
46
  * **H1 Title:**
47
  * **Meta Description:** (under 160 characters)
48
  * **Full H2/H3 outline:**
49
  * **Suggested Visuals:** Where applicable
50
-
51
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}'
52
-
53
  6. **Internal & External Linking Plan:**
54
  * **Internal:** 2-3 relevant articles with anchor suggestions
55
  * **External:** 1-2 reputable sources (.edu, .org, studies)
56
-
57
  7. **E-E-A-T Enhancements:**
58
  * 1-2 ways to show experience, trust, and authority in the content
59
-
60
  8. **SEO Performance Metrics:**
61
  * Expected keyword difficulty (1-100)
62
  * Estimated monthly search volume
@@ -65,50 +53,39 @@ I require the following, formatted in clean markdown:
65
  """,
66
  "baking": """
67
  Act as an elite-level SEO strategist and content creator with deep expertise in food blogs, particularly baking and pastry. I run a blog about baking, and my primary goal is to increase organic traffic, help home bakers improve their skills, and showcase unique recipes. My target audience is home bakers of all skill levels looking for reliable recipes and techniques.
68
-
69
  For the specific topic: '{topic}'
70
-
71
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
72
-
73
  I require the following, formatted in clean markdown:
74
-
75
  1. **Strategic Keyword Analysis:**
76
  * **Primary Target Keyword:**
77
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
78
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
79
  * **Seasonal/Holiday Keywords:** 2-3 if applicable
80
  * **Search Intent Analysis:** (Recipe-seeking, Technique-learning, Equipment-buying, etc.)
81
-
82
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
83
  * For each:
84
  * URL
85
  * Recipe uniqueness/approach
86
  * Visual presentation
87
  * User engagement factors
88
-
89
  3. **Recipe Uniqueness & Value Proposition:**
90
  * Distinctive ingredients or techniques
91
  * How my recipe differs from competitors
92
  * Troubleshooting common issues other recipes don't address
93
-
94
  4. **Optimized Blog Post Outline:**
95
  * **H1 Title:**
96
  * **Meta Description:** (under 160 characters)
97
  * **Full H2/H3 outline** (including "Why This Recipe Works", "Ingredients", "Step-by-Step Instructions", "Storage & Make-Ahead Tips")
98
  * **Recipe Schema Markup Elements:**
99
  * **Required Photo/Video Content:**
100
-
101
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}'
102
-
103
  6. **Internal & External Linking Plan:**
104
  * **Internal:** 2-3 relevant recipes with anchor suggestions
105
  * **External:** 1-2 reputable sources for techniques or ingredient information
106
-
107
  7. **E-E-A-T Enhancements:**
108
  * Recipe testing notes to include
109
  * Personal experience elements to highlight
110
  * Scientific explanation opportunities
111
-
112
  8. **SEO Performance Metrics:**
113
  * Expected keyword difficulty (1-100)
114
  * Estimated monthly search volume
@@ -117,51 +94,40 @@ I require the following, formatted in clean markdown:
117
  """,
118
  "plant_based": """
119
  Act as an elite-level SEO strategist and content creator with deep expertise in plant-based and vegan food blogs. I run a blog about plant-based cooking, and my primary goal is to increase organic traffic, help people transition to more plant-based eating, and provide delicious alternatives to animal products. My target audience includes vegans, vegetarians, flexitarians, and the plant-curious.
120
-
121
  For the specific topic: '{topic}'
122
-
123
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
124
-
125
  I require the following, formatted in clean markdown:
126
-
127
  1. **Strategic Keyword Analysis:**
128
  * **Primary Target Keyword:**
129
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
130
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
131
  * **Dietary Restriction Related Keywords:** (gluten-free, nut-free, soy-free, etc.)
132
  * **Search Intent Analysis:** (Recipe-seeking, Nutrition information, Substitution help, etc.)
133
-
134
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
135
  * For each:
136
  * URL
137
  * Ingredient approach (whole foods vs. processed substitutes)
138
  * Nutritional information provided
139
  * User engagement factors
140
-
141
  3. **Plant-Based Value Proposition:**
142
  * Health/nutritional benefits to highlight
143
  * Environmental/ethical angle if applicable
144
  * Taste/texture comparisons to non-vegan alternatives
145
  * Accessibility of ingredients
146
-
147
  4. **Optimized Blog Post Outline:**
148
  * **H1 Title:**
149
  * **Meta Description:** (under 160 characters)
150
  * **Full H2/H3 outline** (including "Why Choose Plant-Based", "Ingredients & Substitutions", "Step-by-Step Instructions", "Nutritional Information")
151
  * **Recipe Schema Markup Elements:**
152
  * **Required Photo Content:**
153
-
154
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}' (focusing on common substitution questions)
155
-
156
  6. **Internal & External Linking Plan:**
157
  * **Internal:** 2-3 relevant recipes with anchor suggestions
158
  * **External:** 1-2 reputable sources for nutritional information
159
-
160
  7. **E-E-A-T Enhancements:**
161
  * Nutritional expertise to highlight
162
  * Personal experience with plant-based eating
163
  * Scientific/research citations to include
164
-
165
  8. **SEO Performance Metrics:**
166
  * Expected keyword difficulty (1-100)
167
  * Estimated monthly search volume
@@ -170,51 +136,40 @@ I require the following, formatted in clean markdown:
170
  """,
171
  "keto": """
172
  Act as an elite-level SEO strategist and content creator with deep expertise in keto and low-carb food blogs. I run a blog about ketogenic recipes and lifestyle, and my primary goal is to increase organic traffic, help people succeed on keto, and provide delicious low-carb alternatives. My target audience includes keto beginners, experienced keto dieters, and low-carb enthusiasts.
173
-
174
  For the specific topic: '{topic}'
175
-
176
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
177
-
178
  I require the following, formatted in clean markdown:
179
-
180
  1. **Strategic Keyword Analysis:**
181
  * **Primary Target Keyword:**
182
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
183
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
184
  * **Keto-Specific Keywords:** (net carbs, macros, ketosis, etc.)
185
  * **Search Intent Analysis:** (Recipe-seeking, Macro information, Keto compliance, etc.)
186
-
187
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
188
  * For each:
189
  * URL
190
  * Macro accuracy and presentation
191
  * Keto compliance verification
192
  * User engagement factors
193
-
194
  3. **Keto Value Proposition:**
195
  * Net carb calculations
196
  * Macro breakdown (fat/protein/carb ratios)
197
  * Ketone production potential
198
  * Satiety and weight loss benefits
199
-
200
  4. **Optimized Blog Post Outline:**
201
  * **H1 Title:**
202
  * **Meta Description:** (under 160 characters)
203
  * **Full H2/H3 outline** (including "Why This Recipe is Keto", "Ingredients & Net Carbs", "Step-by-Step Instructions", "Macro Information")
204
  * **Recipe Schema Markup Elements:**
205
  * **Required Macro Charts/Tables:**
206
-
207
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}' (focusing on keto compliance questions)
208
-
209
  6. **Internal & External Linking Plan:**
210
  * **Internal:** 2-3 relevant keto recipes with anchor suggestions
211
  * **External:** 1-2 reputable sources for nutritional/keto information
212
-
213
  7. **E-E-A-T Enhancements:**
214
  * Nutritional expertise to highlight
215
  * Personal keto experience elements
216
  * Scientific/research citations for keto benefits
217
-
218
  8. **SEO Performance Metrics:**
219
  * Expected keyword difficulty (1-100)
220
  * Estimated monthly search volume
@@ -223,51 +178,40 @@ I require the following, formatted in clean markdown:
223
  """,
224
  "mediterranean": """
225
  Act as an elite-level SEO strategist and content creator with deep expertise in Mediterranean cuisine and healthy food blogs. I run a blog about Mediterranean cooking and lifestyle, and my primary goal is to increase organic traffic, promote healthy eating habits, and share authentic Mediterranean recipes. My target audience includes health-conscious individuals, Mediterranean diet followers, and those interested in longevity and wellness.
226
-
227
  For the specific topic: '{topic}'
228
-
229
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
230
-
231
  I require the following, formatted in clean markdown:
232
-
233
  1. **Strategic Keyword Analysis:**
234
  * **Primary Target Keyword:**
235
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
236
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
237
  * **Health-Focused Keywords:** (heart-healthy, anti-inflammatory, longevity, etc.)
238
  * **Search Intent Analysis:** (Recipe-seeking, Health information, Cultural learning, etc.)
239
-
240
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
241
  * For each:
242
  * URL
243
  * Authenticity approach
244
  * Health benefit emphasis
245
  * Cultural storytelling elements
246
-
247
  3. **Mediterranean Value Proposition:**
248
  * Health benefits (heart health, longevity, etc.)
249
  * Cultural authenticity and traditions
250
  * Ingredient quality and sourcing
251
  * Lifestyle integration aspects
252
-
253
  4. **Optimized Blog Post Outline:**
254
  * **H1 Title:**
255
  * **Meta Description:** (under 160 characters)
256
  * **Full H2/H3 outline** (including "Mediterranean Diet Benefits", "Authentic Ingredients", "Step-by-Step Instructions", "Cultural Context")
257
  * **Recipe Schema Markup Elements:**
258
  * **Required Cultural/Historical Context:**
259
-
260
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}' (focusing on health and authenticity questions)
261
-
262
  6. **Internal & External Linking Plan:**
263
  * **Internal:** 2-3 relevant Mediterranean recipes with anchor suggestions
264
  * **External:** 1-2 reputable sources for health research or cultural information
265
-
266
  7. **E-E-A-T Enhancements:**
267
  * Cultural expertise or travel experience
268
  * Health research citations
269
  * Traditional cooking method explanations
270
-
271
  8. **SEO Performance Metrics:**
272
  * Expected keyword difficulty (1-100)
273
  * Estimated monthly search volume
@@ -276,51 +220,40 @@ I require the following, formatted in clean markdown:
276
  """,
277
  "desserts": """
278
  Act as an elite-level SEO strategist and content creator with deep expertise in dessert and pastry blogs. I run a blog about desserts and sweet treats, and my primary goal is to increase organic traffic, help home bakers create impressive desserts, and share both classic and innovative sweet recipes. My target audience includes dessert lovers, home bakers, and those looking for special occasion treats.
279
-
280
  For the specific topic: '{topic}'
281
-
282
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
283
-
284
  I require the following, formatted in clean markdown:
285
-
286
  1. **Strategic Keyword Analysis:**
287
  * **Primary Target Keyword:**
288
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
289
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
290
  * **Occasion-Specific Keywords:** (birthday, holiday, celebration, etc.)
291
  * **Search Intent Analysis:** (Recipe-seeking, Technique learning, Decoration ideas, etc.)
292
-
293
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
294
  * For each:
295
  * URL
296
  * Visual presentation quality
297
  * Technique explanation depth
298
  * User engagement factors
299
-
300
  3. **Dessert Value Proposition:**
301
  * Difficulty level and skill requirements
302
  * Visual appeal and presentation
303
  * Flavor profiles and uniqueness
304
  * Make-ahead and storage options
305
-
306
  4. **Optimized Blog Post Outline:**
307
  * **H1 Title:**
308
  * **Meta Description:** (under 160 characters)
309
  * **Full H2/H3 outline** (including "Why This Dessert Works", "Ingredients & Substitutions", "Step-by-Step Instructions", "Decoration Tips", "Storage & Serving")
310
  * **Recipe Schema Markup Elements:**
311
  * **Required Photo/Video Content:**
312
-
313
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}' (focusing on technique and troubleshooting questions)
314
-
315
  6. **Internal & External Linking Plan:**
316
  * **Internal:** 2-3 relevant dessert recipes with anchor suggestions
317
  * **External:** 1-2 reputable sources for technique or ingredient information
318
-
319
  7. **E-E-A-T Enhancements:**
320
  * Baking expertise and testing notes
321
  * Personal experience with techniques
322
  * Scientific explanations for baking chemistry
323
-
324
  8. **SEO Performance Metrics:**
325
  * Expected keyword difficulty (1-100)
326
  * Estimated monthly search volume
@@ -972,14 +905,14 @@ with gr.Blocks(title="Enhanced SEO Assistant", theme=custom_theme, css="""
972
  outputs_map["api_status"] = api_status
973
  with gr.Row():
974
  with gr.Column():
975
- gr.Markdown("### 🎛️ Advanced Settings")
976
  temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.7, step=0.1, label="Temperature (Creativity)", info="Higher = more creative, Lower = more focused")
977
  inputs_map["temperature"] = temperature
978
  with gr.Column():
979
  max_tokens = gr.Slider(minimum=2000, maximum=8000, value=6000, step=500, label="Max Output Length", info="Maximum response length")
980
  inputs_map["max_tokens"] = max_tokens
981
  with gr.Column():
982
- include_advanced = gr.Checkbox(label="Include Advanced Metrics", value=True, info="Include technical SEO and content distribution strategies")
983
  inputs_map["include_advanced"] = include_advanced
984
 
985
  # ============== SECTION 2: Template & Language Selection ==============
 
 
1
  import gradio as gr
2
  import google.generativeai as genai
3
  import os
 
16
  DEFAULT_TEMPLATES = {
17
  "fermentation": """
18
  Act as an elite-level SEO strategist and content creator with deep expertise in food blogs, particularly fermentation. I run a blog about fermentation, and my primary goal is to increase organic traffic, educate beginners, and establish thought leadership. My target audience is beginners curious about home fermentation and health-conscious individuals.
 
19
  For the specific topic: '{topic}'
 
20
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
 
21
  I require the following, formatted in clean markdown:
 
22
  1. **Strategic Keyword Analysis:**
23
  * **Primary Target Keyword:**
24
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
25
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
26
  * **Semantic/LSI Keywords:** 5-7 contextually related terms.
27
  * **Search Intent Analysis:** (Informational, Commercial, etc.)
 
28
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
29
  * For each:
30
  * URL
31
  * Strengths
32
  * Weaknesses
33
  * Content angle/hook
 
34
  3. **Content Gaps & Unique Value Proposition:**
35
  * Missing topics or angles
36
  * Unique insights or differentiators for *my* blog
 
37
  4. **Optimized Blog Post Outline:**
38
  * **H1 Title:**
39
  * **Meta Description:** (under 160 characters)
40
  * **Full H2/H3 outline:**
41
  * **Suggested Visuals:** Where applicable
 
42
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}'
 
43
  6. **Internal & External Linking Plan:**
44
  * **Internal:** 2-3 relevant articles with anchor suggestions
45
  * **External:** 1-2 reputable sources (.edu, .org, studies)
 
46
  7. **E-E-A-T Enhancements:**
47
  * 1-2 ways to show experience, trust, and authority in the content
 
48
  8. **SEO Performance Metrics:**
49
  * Expected keyword difficulty (1-100)
50
  * Estimated monthly search volume
 
53
  """,
54
  "baking": """
55
  Act as an elite-level SEO strategist and content creator with deep expertise in food blogs, particularly baking and pastry. I run a blog about baking, and my primary goal is to increase organic traffic, help home bakers improve their skills, and showcase unique recipes. My target audience is home bakers of all skill levels looking for reliable recipes and techniques.
 
56
  For the specific topic: '{topic}'
 
57
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
 
58
  I require the following, formatted in clean markdown:
 
59
  1. **Strategic Keyword Analysis:**
60
  * **Primary Target Keyword:**
61
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
62
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
63
  * **Seasonal/Holiday Keywords:** 2-3 if applicable
64
  * **Search Intent Analysis:** (Recipe-seeking, Technique-learning, Equipment-buying, etc.)
 
65
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
66
  * For each:
67
  * URL
68
  * Recipe uniqueness/approach
69
  * Visual presentation
70
  * User engagement factors
 
71
  3. **Recipe Uniqueness & Value Proposition:**
72
  * Distinctive ingredients or techniques
73
  * How my recipe differs from competitors
74
  * Troubleshooting common issues other recipes don't address
 
75
  4. **Optimized Blog Post Outline:**
76
  * **H1 Title:**
77
  * **Meta Description:** (under 160 characters)
78
  * **Full H2/H3 outline** (including "Why This Recipe Works", "Ingredients", "Step-by-Step Instructions", "Storage & Make-Ahead Tips")
79
  * **Recipe Schema Markup Elements:**
80
  * **Required Photo/Video Content:**
 
81
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}'
 
82
  6. **Internal & External Linking Plan:**
83
  * **Internal:** 2-3 relevant recipes with anchor suggestions
84
  * **External:** 1-2 reputable sources for techniques or ingredient information
 
85
  7. **E-E-A-T Enhancements:**
86
  * Recipe testing notes to include
87
  * Personal experience elements to highlight
88
  * Scientific explanation opportunities
 
89
  8. **SEO Performance Metrics:**
90
  * Expected keyword difficulty (1-100)
91
  * Estimated monthly search volume
 
94
  """,
95
  "plant_based": """
96
  Act as an elite-level SEO strategist and content creator with deep expertise in plant-based and vegan food blogs. I run a blog about plant-based cooking, and my primary goal is to increase organic traffic, help people transition to more plant-based eating, and provide delicious alternatives to animal products. My target audience includes vegans, vegetarians, flexitarians, and the plant-curious.
 
97
  For the specific topic: '{topic}'
 
98
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
 
99
  I require the following, formatted in clean markdown:
 
100
  1. **Strategic Keyword Analysis:**
101
  * **Primary Target Keyword:**
102
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
103
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
104
  * **Dietary Restriction Related Keywords:** (gluten-free, nut-free, soy-free, etc.)
105
  * **Search Intent Analysis:** (Recipe-seeking, Nutrition information, Substitution help, etc.)
 
106
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
107
  * For each:
108
  * URL
109
  * Ingredient approach (whole foods vs. processed substitutes)
110
  * Nutritional information provided
111
  * User engagement factors
 
112
  3. **Plant-Based Value Proposition:**
113
  * Health/nutritional benefits to highlight
114
  * Environmental/ethical angle if applicable
115
  * Taste/texture comparisons to non-vegan alternatives
116
  * Accessibility of ingredients
 
117
  4. **Optimized Blog Post Outline:**
118
  * **H1 Title:**
119
  * **Meta Description:** (under 160 characters)
120
  * **Full H2/H3 outline** (including "Why Choose Plant-Based", "Ingredients & Substitutions", "Step-by-Step Instructions", "Nutritional Information")
121
  * **Recipe Schema Markup Elements:**
122
  * **Required Photo Content:**
 
123
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}' (focusing on common substitution questions)
 
124
  6. **Internal & External Linking Plan:**
125
  * **Internal:** 2-3 relevant recipes with anchor suggestions
126
  * **External:** 1-2 reputable sources for nutritional information
 
127
  7. **E-E-A-T Enhancements:**
128
  * Nutritional expertise to highlight
129
  * Personal experience with plant-based eating
130
  * Scientific/research citations to include
 
131
  8. **SEO Performance Metrics:**
132
  * Expected keyword difficulty (1-100)
133
  * Estimated monthly search volume
 
136
  """,
137
  "keto": """
138
  Act as an elite-level SEO strategist and content creator with deep expertise in keto and low-carb food blogs. I run a blog about ketogenic recipes and lifestyle, and my primary goal is to increase organic traffic, help people succeed on keto, and provide delicious low-carb alternatives. My target audience includes keto beginners, experienced keto dieters, and low-carb enthusiasts.
 
139
  For the specific topic: '{topic}'
 
140
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
 
141
  I require the following, formatted in clean markdown:
 
142
  1. **Strategic Keyword Analysis:**
143
  * **Primary Target Keyword:**
144
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
145
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
146
  * **Keto-Specific Keywords:** (net carbs, macros, ketosis, etc.)
147
  * **Search Intent Analysis:** (Recipe-seeking, Macro information, Keto compliance, etc.)
 
148
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
149
  * For each:
150
  * URL
151
  * Macro accuracy and presentation
152
  * Keto compliance verification
153
  * User engagement factors
 
154
  3. **Keto Value Proposition:**
155
  * Net carb calculations
156
  * Macro breakdown (fat/protein/carb ratios)
157
  * Ketone production potential
158
  * Satiety and weight loss benefits
 
159
  4. **Optimized Blog Post Outline:**
160
  * **H1 Title:**
161
  * **Meta Description:** (under 160 characters)
162
  * **Full H2/H3 outline** (including "Why This Recipe is Keto", "Ingredients & Net Carbs", "Step-by-Step Instructions", "Macro Information")
163
  * **Recipe Schema Markup Elements:**
164
  * **Required Macro Charts/Tables:**
 
165
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}' (focusing on keto compliance questions)
 
166
  6. **Internal & External Linking Plan:**
167
  * **Internal:** 2-3 relevant keto recipes with anchor suggestions
168
  * **External:** 1-2 reputable sources for nutritional/keto information
 
169
  7. **E-E-A-T Enhancements:**
170
  * Nutritional expertise to highlight
171
  * Personal keto experience elements
172
  * Scientific/research citations for keto benefits
 
173
  8. **SEO Performance Metrics:**
174
  * Expected keyword difficulty (1-100)
175
  * Estimated monthly search volume
 
178
  """,
179
  "mediterranean": """
180
  Act as an elite-level SEO strategist and content creator with deep expertise in Mediterranean cuisine and healthy food blogs. I run a blog about Mediterranean cooking and lifestyle, and my primary goal is to increase organic traffic, promote healthy eating habits, and share authentic Mediterranean recipes. My target audience includes health-conscious individuals, Mediterranean diet followers, and those interested in longevity and wellness.
 
181
  For the specific topic: '{topic}'
 
182
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
 
183
  I require the following, formatted in clean markdown:
 
184
  1. **Strategic Keyword Analysis:**
185
  * **Primary Target Keyword:**
186
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
187
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
188
  * **Health-Focused Keywords:** (heart-healthy, anti-inflammatory, longevity, etc.)
189
  * **Search Intent Analysis:** (Recipe-seeking, Health information, Cultural learning, etc.)
 
190
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
191
  * For each:
192
  * URL
193
  * Authenticity approach
194
  * Health benefit emphasis
195
  * Cultural storytelling elements
 
196
  3. **Mediterranean Value Proposition:**
197
  * Health benefits (heart health, longevity, etc.)
198
  * Cultural authenticity and traditions
199
  * Ingredient quality and sourcing
200
  * Lifestyle integration aspects
 
201
  4. **Optimized Blog Post Outline:**
202
  * **H1 Title:**
203
  * **Meta Description:** (under 160 characters)
204
  * **Full H2/H3 outline** (including "Mediterranean Diet Benefits", "Authentic Ingredients", "Step-by-Step Instructions", "Cultural Context")
205
  * **Recipe Schema Markup Elements:**
206
  * **Required Cultural/Historical Context:**
 
207
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}' (focusing on health and authenticity questions)
 
208
  6. **Internal & External Linking Plan:**
209
  * **Internal:** 2-3 relevant Mediterranean recipes with anchor suggestions
210
  * **External:** 1-2 reputable sources for health research or cultural information
 
211
  7. **E-E-A-T Enhancements:**
212
  * Cultural expertise or travel experience
213
  * Health research citations
214
  * Traditional cooking method explanations
 
215
  8. **SEO Performance Metrics:**
216
  * Expected keyword difficulty (1-100)
217
  * Estimated monthly search volume
 
220
  """,
221
  "desserts": """
222
  Act as an elite-level SEO strategist and content creator with deep expertise in dessert and pastry blogs. I run a blog about desserts and sweet treats, and my primary goal is to increase organic traffic, help home bakers create impressive desserts, and share both classic and innovative sweet recipes. My target audience includes dessert lovers, home bakers, and those looking for special occasion treats.
 
223
  For the specific topic: '{topic}'
 
224
  Analyze and generate a comprehensive SEO content plan designed to rank highly on Google and provide exceptional user value. Ensure all outputs adhere to E-E-A-T principles.
 
225
  I require the following, formatted in clean markdown:
 
226
  1. **Strategic Keyword Analysis:**
227
  * **Primary Target Keyword:**
228
  * **Secondary Keywords:** 2-3 closely related, high-intent keywords.
229
  * **Long-Tail Keywords & User Questions:** 5-7 specific user-searched phrases.
230
  * **Occasion-Specific Keywords:** (birthday, holiday, celebration, etc.)
231
  * **Search Intent Analysis:** (Recipe-seeking, Technique learning, Decoration ideas, etc.)
 
232
  2. **Competitive Landscape Overview (Top 3-5 Competitors):**
233
  * For each:
234
  * URL
235
  * Visual presentation quality
236
  * Technique explanation depth
237
  * User engagement factors
 
238
  3. **Dessert Value Proposition:**
239
  * Difficulty level and skill requirements
240
  * Visual appeal and presentation
241
  * Flavor profiles and uniqueness
242
  * Make-ahead and storage options
 
243
  4. **Optimized Blog Post Outline:**
244
  * **H1 Title:**
245
  * **Meta Description:** (under 160 characters)
246
  * **Full H2/H3 outline** (including "Why This Dessert Works", "Ingredients & Substitutions", "Step-by-Step Instructions", "Decoration Tips", "Storage & Serving")
247
  * **Recipe Schema Markup Elements:**
248
  * **Required Photo/Video Content:**
 
249
  5. **User-Focused FAQ Section:** 3–5 related to '{topic}' (focusing on technique and troubleshooting questions)
 
250
  6. **Internal & External Linking Plan:**
251
  * **Internal:** 2-3 relevant dessert recipes with anchor suggestions
252
  * **External:** 1-2 reputable sources for technique or ingredient information
 
253
  7. **E-E-A-T Enhancements:**
254
  * Baking expertise and testing notes
255
  * Personal experience with techniques
256
  * Scientific explanations for baking chemistry
 
257
  8. **SEO Performance Metrics:**
258
  * Expected keyword difficulty (1-100)
259
  * Estimated monthly search volume
 
905
  outputs_map["api_status"] = api_status
906
  with gr.Row():
907
  with gr.Column():
908
+ #gr.Markdown("### 🎛️ Advanced Settings")
909
  temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.7, step=0.1, label="Temperature (Creativity)", info="Higher = more creative, Lower = more focused")
910
  inputs_map["temperature"] = temperature
911
  with gr.Column():
912
  max_tokens = gr.Slider(minimum=2000, maximum=8000, value=6000, step=500, label="Max Output Length", info="Maximum response length")
913
  inputs_map["max_tokens"] = max_tokens
914
  with gr.Column():
915
+ include_advanced = gr.Checkbox(label="Include Advanced Metrics", lines=2, value=True, info="Include technical SEO and content distribution strategies")
916
  inputs_map["include_advanced"] = include_advanced
917
 
918
  # ============== SECTION 2: Template & Language Selection ==============