Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
#
|
111 |
-
formatted_report =
|
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()
|