Spaces:
Runtime error
Runtime error
Update utils/optimizer.py
Browse filesfixed the IndentationError
- utils/optimizer.py +4 -6
utils/optimizer.py
CHANGED
|
@@ -78,9 +78,8 @@ class ContentOptimizer:
|
|
| 78 |
)
|
| 79 |
|
| 80 |
# Competitive content analysis prompt
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
)
|
| 84 |
|
| 85 |
|
| 86 |
# Dedicated prompt for rewriting/optimizing content
|
|
@@ -433,9 +432,8 @@ class ContentOptimizer:
|
|
| 433 |
Dict: Voice search optimization results
|
| 434 |
"""
|
| 435 |
try:
|
| 436 |
-
self.voice_prompt = (
|
| 437 |
-
|
| 438 |
-
)
|
| 439 |
|
| 440 |
prompt_template = ChatPromptTemplate.from_messages([
|
| 441 |
SystemMessagePromptTemplate.from_template(voice_prompt.format(content=content[:4000])),
|
|
|
|
| 78 |
)
|
| 79 |
|
| 80 |
# Competitive content analysis prompt
|
| 81 |
+
self.competitive_analysis_prompt = ("Analyze the following content for AI search optimization gaps in entities, questions, clarity, flow, and semantic links. Return JSON with gaps and actionable recommendations.\nContent: {content}")
|
| 82 |
+
|
|
|
|
| 83 |
|
| 84 |
|
| 85 |
# Dedicated prompt for rewriting/optimizing content
|
|
|
|
| 432 |
Dict: Voice search optimization results
|
| 433 |
"""
|
| 434 |
try:
|
| 435 |
+
self.voice_prompt = ("Optimize the following content for voice search and conversational AI by improving natural language flow, question-based structure, tone, and featured snippet potential. Return JSON with improved content, Q&A pairs, snippet candidates, and a conversational score.\nContent: {content}")
|
| 436 |
+
|
|
|
|
| 437 |
|
| 438 |
prompt_template = ChatPromptTemplate.from_messages([
|
| 439 |
SystemMessagePromptTemplate.from_template(voice_prompt.format(content=content[:4000])),
|