ihtesham0345 commited on
Commit
c19bbb8
·
1 Parent(s): 2cf0f7b

fix: Escape curly braces in f-string causing Invalid format specifier

Browse files
Files changed (1) hide show
  1. services/instagram_analyzer.py +1 -1
services/instagram_analyzer.py CHANGED
@@ -13,6 +13,6 @@ DEFAULTS = {
13
  def analyze_instagram(content: str) -> dict:
14
  messages = [
15
  {"role": "system", "content": SYSTEM_PROMPT},
16
- {"role": "user", "content": f'Topic: "{content[:1000]}"\nReturn JSON:\n- captions (2 items, each with "caption" + "tone")\n- hashtag_sets: {"small": [3], "medium": [3], "large": [3]}\n- content_ideas: {"reels": [2], "carousels": [2], "stories": [2]}\n- best_posting_time (string)\n- growth_strategies (2 items)'}
17
  ]
18
  return run_analysis(messages, defaults=DEFAULTS, temperature=0.35, max_new_tokens=800)
 
13
  def analyze_instagram(content: str) -> dict:
14
  messages = [
15
  {"role": "system", "content": SYSTEM_PROMPT},
16
+ {"role": "user", "content": f'Topic: "{content[:1000]}"\nReturn JSON:\n- captions (2 items, each with "caption" + "tone")\n- hashtag_sets: {{"small": [3], "medium": [3], "large": [3]}}\n- content_ideas: {{"reels": [2], "carousels": [2], "stories": [2]}}\n- best_posting_time (string)\n- growth_strategies (2 items)'}
17
  ]
18
  return run_analysis(messages, defaults=DEFAULTS, temperature=0.35, max_new_tokens=800)