Spaces:
Running
Running
Update working_yolo_pipeline.py
Browse files- working_yolo_pipeline.py +2 -0
working_yolo_pipeline.py
CHANGED
|
@@ -257,6 +257,8 @@ def get_latex_from_base64(base64_string: str) -> str:
|
|
| 257 |
# *** CORE CHANGE: Remove all spaces/line breaks as requested by the user ***
|
| 258 |
# This uses regex to replace any sequence of whitespace characters (spaces, tabs, newlines) with an empty string.
|
| 259 |
cleaned_latex = re.sub(r'\s+', '', extracted_latex)
|
|
|
|
|
|
|
| 260 |
|
| 261 |
if not cleaned_latex:
|
| 262 |
return "[P2T_WARNING: No formula found]"
|
|
|
|
| 257 |
# *** CORE CHANGE: Remove all spaces/line breaks as requested by the user ***
|
| 258 |
# This uses regex to replace any sequence of whitespace characters (spaces, tabs, newlines) with an empty string.
|
| 259 |
cleaned_latex = re.sub(r'\s+', '', extracted_latex)
|
| 260 |
+
cleaned_latex = re.sub('\\', '\', cleaned_latex)
|
| 261 |
+
|
| 262 |
|
| 263 |
if not cleaned_latex:
|
| 264 |
return "[P2T_WARNING: No formula found]"
|