Guiyom commited on
Commit
ffdc0dc
·
verified ·
1 Parent(s): 354a2a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1191,7 +1191,7 @@ def replace_focus_placeholders(report_html: str, context: str, initial_query: st
1191
  return re.sub(pattern, placeholder_replacer, report_html, flags=re.DOTALL)
1192
 
1193
  def generate_focus_snippet(placeholder_text: str, context: str, initial_query: str, crumbs: str) -> str:
1194
- prompt = (f"""
1195
  Generate a complete, self-contained inner-HTML code (only the content inside <div> tags, no outer <html> tags) with inline CSS.
1196
  The code should provide an elaborate technical drill‐down on the topic:
1197
  {placeholder_text}
@@ -1236,8 +1236,7 @@ Important: you can safely mention any of these provided you respect the above me
1236
  - Take a deep breath, think step by step and think it well.
1237
  - no introduction, conclusions, code fences -> Output the result directly
1238
  - title should be h2 level (inside the focus box) then the content
1239
- """)
1240
-
1241
  result = openai_call(prompt, model="o3-mini", max_tokens_param=10000)
1242
  result = result.strip().strip("```").strip()
1243
  result = re.sub(r'\{\[\{(.*?)\}\]\}', r'\1', result)
 
1191
  return re.sub(pattern, placeholder_replacer, report_html, flags=re.DOTALL)
1192
 
1193
  def generate_focus_snippet(placeholder_text: str, context: str, initial_query: str, crumbs: str) -> str:
1194
+ prompt = f"""
1195
  Generate a complete, self-contained inner-HTML code (only the content inside <div> tags, no outer <html> tags) with inline CSS.
1196
  The code should provide an elaborate technical drill‐down on the topic:
1197
  {placeholder_text}
 
1236
  - Take a deep breath, think step by step and think it well.
1237
  - no introduction, conclusions, code fences -> Output the result directly
1238
  - title should be h2 level (inside the focus box) then the content
1239
+ """
 
1240
  result = openai_call(prompt, model="o3-mini", max_tokens_param=10000)
1241
  result = result.strip().strip("```").strip()
1242
  result = re.sub(r'\{\[\{(.*?)\}\]\}', r'\1', result)