Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,11 +15,9 @@ from paddleocr import PaddleOCR
|
|
15 |
from doctr.io import DocumentFile
|
16 |
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
# os.environ['USE_TORCH'] = 'YES'
|
22 |
-
# os.environ['USE_TF'] = 'NO'
|
23 |
|
24 |
from doctr.models import ocr_predictor
|
25 |
model = ocr_predictor(det_arch='db_resnet50', reco_arch='crnn_vgg16_bn', pretrained=True)
|
|
|
15 |
from doctr.io import DocumentFile
|
16 |
|
17 |
|
18 |
+
os.environ["CUDA_VISIBLE_DEVICES"] = "0" # Use GPU 0, adjust if needed
|
19 |
+
os.environ["TF_FORCE_GPU_ALLOW_GROWTH"] = "true"
|
20 |
+
|
|
|
|
|
21 |
|
22 |
from doctr.models import ocr_predictor
|
23 |
model = ocr_predictor(det_arch='db_resnet50', reco_arch='crnn_vgg16_bn', pretrained=True)
|