Spaces:
Build error
Build error
Update app.py
Browse files
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))
|