heerjtdev commited on
Commit
be01b16
·
verified ·
1 Parent(s): 6b9e9e4

Update working_yolo_pipeline.py

Browse files
Files changed (1) hide show
  1. working_yolo_pipeline.py +3 -2
working_yolo_pipeline.py CHANGED
@@ -121,8 +121,9 @@ def get_latex_from_base64(base64_string: str) -> str:
121
 
122
  # --- 4. Post-processing and Cleanup ---
123
 
124
- # A. Remove all spaces/line breaks
125
- cleaned_latex = re.sub(r'\s+', '', latex_string)
 
126
 
127
  # B. CRITICAL FIX: Replace double backslashes (\\) with single backslashes (\).
128
  # This corrects model output that already over-escaped the LaTeX commands.
 
121
 
122
  # --- 4. Post-processing and Cleanup ---
123
 
124
+ # # A. Remove all spaces/line breaks
125
+ # cleaned_latex = re.sub(r'\s+', '', latex_string)
126
+ cleaned_latex = re.sub(r'[\r\n]+', '', latex_string)
127
 
128
  # B. CRITICAL FIX: Replace double backslashes (\\) with single backslashes (\).
129
  # This corrects model output that already over-escaped the LaTeX commands.