Ali2206 commited on
Commit
aeab9ad
·
verified ·
1 Parent(s): 1219574

Update ui/ui_core.py

Browse files
Files changed (1) hide show
  1. ui/ui_core.py +5 -4
ui/ui_core.py CHANGED
@@ -18,11 +18,12 @@ def clean_final_response(text: str) -> str:
18
  sections = cleaned.split("[Final Analysis]")
19
  if len(sections) > 1:
20
  final = sections[1].strip()
 
21
  return (
22
- f"<div style='padding:1em;border:2px solid #4B4CED;background:#242C3B;border-radius:12px;color:#fff;'>"
23
- f"<h3 style='margin-top:0;color:#37B6E9;'>🧠 Final Analysis</h3>"
24
- f"<ul><li style='margin-bottom:0.75em;'>{final.replace(chr(10), '</li><li style=\'margin-bottom:0.75em;\'>')}</li></ul>"
25
- f"</div>"
26
  )
27
  return f"<div style='padding:1em;border:1px solid #ccc;border-radius:12px;color:#fff;background:#353F54;'><p>{cleaned}</p></div>"
28
 
 
18
  sections = cleaned.split("[Final Analysis]")
19
  if len(sections) > 1:
20
  final = sections[1].strip()
21
+ formatted_final = final.replace("\n", "</li><li style='margin-bottom:0.75em;'>")
22
  return (
23
+ "<div style='padding:1em;border:2px solid #4B4CED;background:#242C3B;border-radius:12px;color:#fff;'>"
24
+ "<h3 style='margin-top:0;color:#37B6E9;'>🧠 Final Analysis</h3>"
25
+ f"<ul><li style='margin-bottom:0.75em;'>{formatted_final}</li></ul>"
26
+ "</div>"
27
  )
28
  return f"<div style='padding:1em;border:1px solid #ccc;border-radius:12px;color:#fff;background:#353F54;'><p>{cleaned}</p></div>"
29