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