Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ torch.hub.download_url_to_file('https://i.imgur.com/aqMBT0i.jpg', 'example.jpg')
|
|
| 10 |
|
| 11 |
def inference(img, lang):
|
| 12 |
ocr = PaddleOCR(use_angle_cls=True, lang=lang,use_gpu=False)
|
| 13 |
-
img_path = img
|
| 14 |
result = ocr.ocr(img_path, cls=True)[0]
|
| 15 |
# image = Image.open(img_path).convert('RGB')
|
| 16 |
boxes = [line[0] for line in result]
|
|
|
|
| 10 |
|
| 11 |
def inference(img, lang):
|
| 12 |
ocr = PaddleOCR(use_angle_cls=True, lang=lang,use_gpu=False)
|
| 13 |
+
img_path = img
|
| 14 |
result = ocr.ocr(img_path, cls=True)[0]
|
| 15 |
# image = Image.open(img_path).convert('RGB')
|
| 16 |
boxes = [line[0] for line in result]
|