Spaces:
Runtime error
Runtime error
Commit
·
f095eaf
1
Parent(s):
4456e3e
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,11 +10,11 @@ os.system('MMCV_WITH_OPS=1 pip install -e .')
|
|
| 10 |
from mmocr.apis import MMOCRInferencer
|
| 11 |
import mmcv
|
| 12 |
|
| 13 |
-
infer = MMOCRInferencer(det='dbnetpp', rec='svtr-small', kie='SDMGR'
|
| 14 |
|
| 15 |
def inference(filename):
|
| 16 |
|
| 17 |
-
result = infer(filename)
|
| 18 |
print(len(result['visualization']))
|
| 19 |
return result['predictions'],result['visualization'][0]
|
| 20 |
|
|
|
|
| 10 |
from mmocr.apis import MMOCRInferencer
|
| 11 |
import mmcv
|
| 12 |
|
| 13 |
+
infer = MMOCRInferencer(det='dbnetpp', rec='svtr-small', kie='SDMGR')
|
| 14 |
|
| 15 |
def inference(filename):
|
| 16 |
|
| 17 |
+
result = infer(filename, return_vis=True)
|
| 18 |
print(len(result['visualization']))
|
| 19 |
return result['predictions'],result['visualization'][0]
|
| 20 |
|