for876543 commited on
Commit
82de39e
1 Parent(s): f76e377

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,7 +17,8 @@ with open("/home/user/app/class_mapping.json", "r") as read_file:
17
  classes = json.load(read_file)
18
 
19
  def classify_image(inp):
20
-
 
21
  inp= Resize((300, 300))(inp)
22
  inp= ToTensor()(inp)
23
  inp.append(torch.unsqueeze(inp, 0))
 
17
  classes = json.load(read_file)
18
 
19
  def classify_image(inp):
20
+
21
+ inp = Image.fromarray(inp)
22
  inp= Resize((300, 300))(inp)
23
  inp= ToTensor()(inp)
24
  inp.append(torch.unsqueeze(inp, 0))