Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -194,7 +194,7 @@ def ocr_api():
|
|
| 194 |
# choose call method depending on available API
|
| 195 |
if hasattr(ocr, "ocr"):
|
| 196 |
# classic API: ocr.ocr(image_path, cls=True/False)
|
| 197 |
-
result = ocr.
|
| 198 |
elif hasattr(ocr, "predict"):
|
| 199 |
# some wrappers use predict()
|
| 200 |
result = ocr.predict(img_path)
|
|
|
|
| 194 |
# choose call method depending on available API
|
| 195 |
if hasattr(ocr, "ocr"):
|
| 196 |
# classic API: ocr.ocr(image_path, cls=True/False)
|
| 197 |
+
result = ocr.predict(img_path, det=True, rec=True)
|
| 198 |
elif hasattr(ocr, "predict"):
|
| 199 |
# some wrappers use predict()
|
| 200 |
result = ocr.predict(img_path)
|