Spaces:
Runtime error
Runtime error
JustinLin610
commited on
Commit
·
955051b
1
Parent(s):
a41a3ef
update
Browse files- app.py +2 -2
- ezocr/easyocrlite/reader.py +0 -1
app.py
CHANGED
@@ -65,8 +65,8 @@ def four_point_transform(image: np.ndarray, rect: FourPoint) -> np.ndarray:
|
|
65 |
return warped
|
66 |
|
67 |
|
68 |
-
def get_images(
|
69 |
-
results = reader.process(
|
70 |
return results
|
71 |
|
72 |
|
|
|
65 |
return warped
|
66 |
|
67 |
|
68 |
+
def get_images(img, reader: ReaderLite, **kwargs):
|
69 |
+
results = reader.process(img, **kwargs)
|
70 |
return results
|
71 |
|
72 |
|
ezocr/easyocrlite/reader.py
CHANGED
@@ -122,7 +122,6 @@ class ReaderLite(object):
|
|
122 |
) -> Tuple[BoxTuple, list[np.ndarray]]:
|
123 |
|
124 |
image = img.convert('RGB')
|
125 |
-
|
126 |
tensor, inverse_ratio = self.preprocess(
|
127 |
image, max_size, expand_ratio, sharp, contrast
|
128 |
)
|
|
|
122 |
) -> Tuple[BoxTuple, list[np.ndarray]]:
|
123 |
|
124 |
image = img.convert('RGB')
|
|
|
125 |
tensor, inverse_ratio = self.preprocess(
|
126 |
image, max_size, expand_ratio, sharp, contrast
|
127 |
)
|