napatswift commited on
Commit
0ad5782
1 Parent(s): edc1665

Change to cpu

Browse files
Files changed (1) hide show
  1. main.py +2 -4
main.py CHANGED
@@ -3,10 +3,8 @@ import gradio as gr
3
  import cv2
4
 
5
  model_dir = 'model'
6
- ocr = MMOCR(det='DB_r18',
7
- det_config=f'{model_dir}/config.py',
8
- det_ckpt=f'{model_dir}/epoch_40.pth'
9
- )
10
 
11
  def predict(inp):
12
  return str(ocr.readtext(inp))
 
3
  import cv2
4
 
5
  model_dir = 'model'
6
+ ocr = MMOCR(det_config=f'{model_dir}/config.py',
7
+ det_ckpt=f'{model_dir}/epoch_40.pth', device='cpu')
 
 
8
 
9
  def predict(inp):
10
  return str(ocr.readtext(inp))