Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- image_processing_cpu.py +2 -0
- image_processing_gpu.py +2 -0
image_processing_cpu.py
CHANGED
|
@@ -14,6 +14,8 @@ from utils import (
|
|
| 14 |
validate_ocr_result
|
| 15 |
)
|
| 16 |
|
|
|
|
|
|
|
| 17 |
# ... (le reste du code est inchangé jusqu'à recognize_number_fast_with_image) ...
|
| 18 |
|
| 19 |
def recognize_number_fast_with_image(image_dict, debug: bool = False) -> tuple[str, any, Image.Image | None]: # MODIFICATION DU TYPE DE RETOUR
|
|
|
|
| 14 |
validate_ocr_result
|
| 15 |
)
|
| 16 |
|
| 17 |
+
from PIL import Image
|
| 18 |
+
|
| 19 |
# ... (le reste du code est inchangé jusqu'à recognize_number_fast_with_image) ...
|
| 20 |
|
| 21 |
def recognize_number_fast_with_image(image_dict, debug: bool = False) -> tuple[str, any, Image.Image | None]: # MODIFICATION DU TYPE DE RETOUR
|
image_processing_gpu.py
CHANGED
|
@@ -38,6 +38,8 @@ from utils import (
|
|
| 38 |
validate_ocr_result
|
| 39 |
)
|
| 40 |
|
|
|
|
|
|
|
| 41 |
# ... (le reste du code est inchangé jusqu'à recognize_number_fast_with_image) ...
|
| 42 |
|
| 43 |
@spaces.GPU
|
|
|
|
| 38 |
validate_ocr_result
|
| 39 |
)
|
| 40 |
|
| 41 |
+
from PIL import Image
|
| 42 |
+
|
| 43 |
# ... (le reste du code est inchangé jusqu'à recognize_number_fast_with_image) ...
|
| 44 |
|
| 45 |
@spaces.GPU
|