Spaces:
Runtime error
Runtime error
hope to fixed IndentationError
Browse files- utils/optimizer.py +6 -2
utils/optimizer.py
CHANGED
|
@@ -78,7 +78,9 @@ class ContentOptimizer:
|
|
| 78 |
)
|
| 79 |
|
| 80 |
# Competitive content analysis prompt
|
| 81 |
-
self.competitive_analysis_prompt = (
|
|
|
|
|
|
|
| 82 |
|
| 83 |
|
| 84 |
# Dedicated prompt for rewriting/optimizing content
|
|
@@ -431,7 +433,9 @@ class ContentOptimizer:
|
|
| 431 |
Dict: Voice search optimization results
|
| 432 |
"""
|
| 433 |
try:
|
| 434 |
-
self.voice_prompt = (
|
|
|
|
|
|
|
| 435 |
|
| 436 |
prompt_template = ChatPromptTemplate.from_messages([
|
| 437 |
SystemMessagePromptTemplate.from_template(voice_prompt.format(content=content[:4000])),
|
|
|
|
| 78 |
)
|
| 79 |
|
| 80 |
# Competitive content analysis prompt
|
| 81 |
+
self.competitive_analysis_prompt = (
|
| 82 |
+
"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}"
|
| 83 |
+
)
|
| 84 |
|
| 85 |
|
| 86 |
# Dedicated prompt for rewriting/optimizing content
|
|
|
|
| 433 |
Dict: Voice search optimization results
|
| 434 |
"""
|
| 435 |
try:
|
| 436 |
+
self.voice_prompt = (
|
| 437 |
+
"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}"
|
| 438 |
+
)
|
| 439 |
|
| 440 |
prompt_template = ChatPromptTemplate.from_messages([
|
| 441 |
SystemMessagePromptTemplate.from_template(voice_prompt.format(content=content[:4000])),
|