jaimin commited on
Commit
1fa7933
·
verified ·
1 Parent(s): 6c3510e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -107,10 +107,14 @@ def format_report(raw_text):
107
  # Replace **bold text** with proper markdown formatting
108
  formatted_report = re.sub(r'\*\*(.*?)\*\*', r'**\1**', formatted_report)
109
 
110
- # Convert newlines to <br> for better readability in Streamlit
111
- formatted_report = formatted_report.replace("\n", "<br>")
112
-
 
 
 
113
  return formatted_report
114
 
 
115
  if __name__ == "__main__":
116
  main()
 
107
  # Replace **bold text** with proper markdown formatting
108
  formatted_report = re.sub(r'\*\*(.*?)\*\*', r'**\1**', formatted_report)
109
 
110
+ # Replace **bold** with HTML <strong> to control the bolding in headers only
111
+ formatted_report = re.sub(r'\*\*(.*?)\*\*', r'<strong>\1</strong>', formatted_report)
112
+
113
+ # Now use Markdown for the rest of the text, with normal text not bold
114
+ formatted_report = formatted_report.replace("\n", "<br>") # Use line breaks for formatting
115
+
116
  return formatted_report
117
 
118
+
119
  if __name__ == "__main__":
120
  main()