Spaces:
Runtime error
Runtime error
DerrylNessie
commited on
Commit
•
f459ff6
1
Parent(s):
f450985
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import torch
|
|
7 |
import easyocr
|
8 |
import cv2 as cv
|
9 |
import math
|
|
|
10 |
import numpy as np
|
11 |
|
12 |
torch.hub.download_url_to_file('https://i.pinimg.com/originals/45/d0/30/45d03054e15f4be731781eecba7458a4.jpg', 'korean.jpg')
|
@@ -60,7 +61,7 @@ def inference(img, lang):
|
|
60 |
bounds = reader.readtext(img.name)
|
61 |
im = PIL.Image.open(img.name)
|
62 |
|
63 |
-
img_array =
|
64 |
|
65 |
#mask = PIL.Image.open(img.name)
|
66 |
#mask = Image.new("L", im.size, 0)
|
|
|
7 |
import easyocr
|
8 |
import cv2 as cv
|
9 |
import math
|
10 |
+
from numpy import asarray
|
11 |
import numpy as np
|
12 |
|
13 |
torch.hub.download_url_to_file('https://i.pinimg.com/originals/45/d0/30/45d03054e15f4be731781eecba7458a4.jpg', 'korean.jpg')
|
|
|
61 |
bounds = reader.readtext(img.name)
|
62 |
im = PIL.Image.open(img.name)
|
63 |
|
64 |
+
img_array = np.array(im)
|
65 |
|
66 |
#mask = PIL.Image.open(img.name)
|
67 |
#mask = Image.new("L", im.size, 0)
|