Skip to content

Commit

Permalink
Fix decompression bomb error
Browse files Browse the repository at this point in the history
  • Loading branch information
VikParuchuri committed Dec 3, 2024
1 parent ee96b54 commit 91862fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions marker/renderers/html.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import re
from typing import Literal

from bs4 import BeautifulSoup, MarkupResemblesLocatorWarning
Expand All @@ -7,14 +6,16 @@
from marker.renderers import BaseRenderer
from marker.schema import BlockTypes
from marker.schema.blocks import BlockId
from marker.settings import settings

# Ignore beautifulsoup warnings
import warnings

from marker.settings import settings

warnings.filterwarnings("ignore", category=MarkupResemblesLocatorWarning)

# Suppress DecompressionBombError
from PIL import Image
Image.MAX_IMAGE_PIXELS = None


class HTMLOutput(BaseModel):
html: str
Expand Down
2 changes: 1 addition & 1 deletion marker/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, List, Dict, Literal
from typing import Optional

from dotenv import find_dotenv
from pydantic import computed_field
Expand Down

0 comments on commit 91862fb

Please sign in to comment.