Skip to content

Commit a3fde2f

Browse files
committed
fix readme bugs [skip ci]
1 parent 0230848 commit a3fde2f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,15 @@ Setting the `LAYOUT_BATCH_SIZE` env var properly will make a big difference when
230230
from PIL import Image
231231
from surya.detection import batch_text_detection
232232
from surya.layout import batch_layout_detection
233-
from surya.model.layout.model import load_model, load_processor
233+
from surya.model.detection.model import load_model as load_det_model, load_processor as load_det_processor
234+
from surya.model.layout.model import load_model as load_layout_model
235+
from surya.model.layout.processor import load_processor as load_layout_processor
234236

235237
image = Image.open(IMAGE_PATH)
236-
model = load_model()
237-
processor = load_processor()
238-
det_model = load_model()
239-
det_processor = load_processor()
238+
model = load_layout_model()
239+
processor = load_layout_processor()
240+
det_model = load_det_model()
241+
det_processor = load_det_processor()
240242

241243
# layout_predictions is a list of dicts, one per image
242244
line_predictions = batch_text_detection([image], det_model, det_processor)

0 commit comments

Comments
 (0)