Genzo1010 commited on
Commit
22ed668
·
verified ·
1 Parent(s): 705fe5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -15,11 +15,9 @@ from paddleocr import PaddleOCR
15
  from doctr.io import DocumentFile
16
 
17
 
18
- # os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
19
- # os.environ["TF_FORCE_GPU_ALLOW_GROWTH"] = "true"
20
- # # Load the doctr OCR model
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)