imperiusrex commited on
Commit
bc5fb2a
·
verified ·
1 Parent(s): 3f75711

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  import gradio as gr
2
  import torch
3
  import numpy as np
@@ -32,7 +36,8 @@ candidates = [
32
  ]
33
 
34
  # Initialize PaddleOCR for text detection only
35
- ocr_detector = PaddleOCR(use_textline_orientation=False, lang='en', use_gpu=False)
 
36
 
37
 
38
  # Cache OCR recognizers by language
 
1
+ import os
2
+ os.environ["CUDA_VISIBLE_DEVICES"] = ""
3
+
4
+
5
  import gradio as gr
6
  import torch
7
  import numpy as np
 
36
  ]
37
 
38
  # Initialize PaddleOCR for text detection only
39
+ ocr_detector = PaddleOCR(use_textline_orientation=False, lang='en')
40
+
41
 
42
 
43
  # Cache OCR recognizers by language