Spaces:
Runtime error
Runtime error
changed PIL to numpy
Browse files
app.py
CHANGED
@@ -21,8 +21,8 @@ img_df = pd.read_csv('image_data.csv')
|
|
21 |
|
22 |
def url2img(url):
|
23 |
data = requests.get(url, allow_redirects = True).content
|
24 |
-
return Image.open(io.BytesIO(data))
|
25 |
-
return data
|
26 |
|
27 |
def find_topk(text):
|
28 |
|
|
|
21 |
|
22 |
def url2img(url):
|
23 |
data = requests.get(url, allow_redirects = True).content
|
24 |
+
# return Image.open(io.BytesIO(data))
|
25 |
+
return np.array(io.BytesIO(data))
|
26 |
|
27 |
def find_topk(text):
|
28 |
|