Update api.py
Browse files
api.py
CHANGED
|
@@ -58,8 +58,11 @@ def apply_ocr_on_pdf(buffer):
|
|
| 58 |
|
| 59 |
results = []
|
| 60 |
for image in images:
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
return results
|
| 65 |
|
|
|
|
| 58 |
|
| 59 |
results = []
|
| 60 |
for image in images:
|
| 61 |
+
try:
|
| 62 |
+
result = detect_with_paddle.detect_paddle_OCR(image)
|
| 63 |
+
results.extend(result)
|
| 64 |
+
except:
|
| 65 |
+
print("Sayfada yazı bulunamadı!")
|
| 66 |
|
| 67 |
return results
|
| 68 |
|