marinap commited on
Commit
f9786ad
1 Parent(s): ed9d473

changed PIL to numpy

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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