Make a copy
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ TESSERACT_LABEL = "Tesseract (HF default)"
|
|
24 |
|
25 |
|
26 |
def predict(image: Image.Image, question: str, ocr_engine: str):
|
27 |
-
image_np = np.
|
28 |
|
29 |
if ocr_engine == PADDLE_OCR_LABEL:
|
30 |
ocr_result = OCR.ocr(image_np)[0]
|
|
|
24 |
|
25 |
|
26 |
def predict(image: Image.Image, question: str, ocr_engine: str):
|
27 |
+
image_np = np.array(image)
|
28 |
|
29 |
if ocr_engine == PADDLE_OCR_LABEL:
|
30 |
ocr_result = OCR.ocr(image_np)[0]
|