Spaces:
Running
Running
updated for CPU
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def process_image(image, identifier_lang):
|
|
28 |
image.save(image_path)
|
29 |
|
30 |
# Initialize OCR with the selected identifier language
|
31 |
-
ocr = OCR(identifier_lang=identifier_lang, verbose=False)
|
32 |
|
33 |
# Detect bounding boxes on the image using OCR
|
34 |
detections = ocr.detect(image_path)
|
|
|
28 |
image.save(image_path)
|
29 |
|
30 |
# Initialize OCR with the selected identifier language
|
31 |
+
ocr = OCR(device="cpu", identifier_lang=identifier_lang, verbose=False)
|
32 |
|
33 |
# Detect bounding boxes on the image using OCR
|
34 |
detections = ocr.detect(image_path)
|