Skip to content

Commit

Permalink
Omit formula errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-piles committed Oct 18, 2024
1 parent 20b325f commit c6813b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extraction_formats/extract_formula_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ def extract_formula_format(pdf_images: PdfImages, predicted_segments: list[PdfSe
formula_image = page_image.crop((left, top, left + width, top + height))
try:
extracted_formula = get_latex_format(model, formula_image)
except RuntimeError:
except (ValueError, RuntimeError):
continue
predicted_segments[index].text_content = extracted_formula

0 comments on commit c6813b0

Please sign in to comment.