GnanaPrasath commited on
Commit
9dbc07d
·
verified ·
1 Parent(s): a4d6049

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -4,10 +4,15 @@ import torch
4
 
5
  torch.hub.load('baudm/parseq', 'parseq', pretrained=True)
6
 
7
- model_path = r"parseq_tamil_v6.ckpt"
8
- text_detect_model = r"craft_mlt_25k.pth" # add the full path of the craft model
9
- ocr_detect = OCR(detect=True,tamil_model_path=model_path,detect_model_path=text_detect_model,enable_cuda=True)
10
- ocr_recognize = OCR(detect=False,tamil_model_path=model_path,detect_model_path=text_detect_model,enable_cuda=True)
 
 
 
 
 
11
 
12
  def predict(image_path,mode):
13
  if mode == "recognize":
 
4
 
5
  torch.hub.load('baudm/parseq', 'parseq', pretrained=True)
6
 
7
+ # model_path = r"parseq_tamil_v6.ckpt"
8
+ # text_detect_model = r"craft_mlt_25k.pth" # add the full path of the craft model
9
+ # ocr_detect = OCR(detect=True,tamil_model_path=model_path,detect_model_path=text_detect_model,enable_cuda=True)
10
+ # ocr_recognize = OCR(detect=False,tamil_model_path=model_path,detect_model_path=text_detect_model,enable_cuda=True)
11
+
12
+
13
+ ocr_detect = OCR(detect=True,enable_cuda=False)
14
+ ocr_recognize = OCR(detect=False,enable_cuda=False)
15
+
16
 
17
  def predict(image_path,mode):
18
  if mode == "recognize":