Spaces:
Build error
Build error
napatswift
commited on
Commit
•
3c11248
1
Parent(s):
49aa0b6
add recog model
Browse files
main.py
CHANGED
@@ -8,8 +8,11 @@ import torch
|
|
8 |
print('Loading model...')
|
9 |
device = 'gpu' if torch.cuda.is_available() else 'cpu'
|
10 |
|
11 |
-
ocr = MMOCRInferencer(
|
|
|
12 |
det_weights='model/text-det/psenet.pth',
|
|
|
|
|
13 |
device=device)
|
14 |
|
15 |
def get_rec(points):
|
|
|
8 |
print('Loading model...')
|
9 |
device = 'gpu' if torch.cuda.is_available() else 'cpu'
|
10 |
|
11 |
+
ocr = MMOCRInferencer(
|
12 |
+
det='model/text-det/psenet.py',
|
13 |
det_weights='model/text-det/psenet.pth',
|
14 |
+
rec='model/text-recog/config.py',
|
15 |
+
rec_weights='model/text-recog/model.pth',
|
16 |
device=device)
|
17 |
|
18 |
def get_rec(points):
|