Genzo1010 commited on
Commit
5625530
·
verified ·
1 Parent(s): 0572469

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -17,6 +17,9 @@ from doctr.io import DocumentFile
17
 
18
  os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
19
  os.environ["TF_FORCE_GPU_ALLOW_GROWTH"] = "true"
 
 
 
20
 
21
  from doctr.models import ocr_predictor
22
  ocr_model = ocr_predictor(pretrained=True)
 
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
  ocr_model = ocr_predictor(pretrained=True)