Skip to content

Commit

Permalink
fix highQualityLayoutBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
iammosespaulr committed Dec 20, 2024
1 parent 796966c commit 4d4c469
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions marker/builders/high_quality_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from google.ai.generativelanguage_v1beta.types import content
from google.api_core.exceptions import ResourceExhausted
from surya.model.layout.encoderdecoder import SuryaLayoutModel
from surya.model.ocr_error.model import DistilBertForSequenceClassification
from tqdm import tqdm

from marker.builders.layout import LayoutBuilder
Expand Down Expand Up @@ -67,8 +68,9 @@ class HighQualityLayoutBuilder(LayoutBuilder):
"""

def __init__(self, layout_model: SuryaLayoutModel, config=None):
super().__init__(layout_model, config)
def __init__(self, layout_model: SuryaLayoutModel, ocr_error_model: DistilBertForSequenceClassification, config=None):
self.layout_model = layout_model
self.ocr_error_model = ocr_error_model

self.model = None
if self.google_api_key is None:
Expand Down

0 comments on commit 4d4c469

Please sign in to comment.