Spaces:
Sleeping
Sleeping
Upload image_processing_gpu.py
Browse files- image_processing_gpu.py +1 -0
image_processing_gpu.py
CHANGED
|
@@ -67,6 +67,7 @@ def get_ocr_model_info() -> dict:
|
|
| 67 |
"version": "microsoft/trocr-base-handwritten"
|
| 68 |
}
|
| 69 |
|
|
|
|
| 70 |
def recognize_number_fast_with_image(image_dict, debug: bool = False) -> tuple[str, any, dict | None]:
|
| 71 |
"""
|
| 72 |
OCR avec TrOCR (GPU optimisé)
|
|
|
|
| 67 |
"version": "microsoft/trocr-base-handwritten"
|
| 68 |
}
|
| 69 |
|
| 70 |
+
@spaces.GPU # Décorateur requis pour HF Pro GPU
|
| 71 |
def recognize_number_fast_with_image(image_dict, debug: bool = False) -> tuple[str, any, dict | None]:
|
| 72 |
"""
|
| 73 |
OCR avec TrOCR (GPU optimisé)
|