Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,7 +86,6 @@ def classifyCar(im):
|
|
| 86 |
im2 = carTransforms(im2)
|
| 87 |
|
| 88 |
label = "success"
|
| 89 |
-
img = Image.toarray(im2)
|
| 90 |
except:
|
| 91 |
label = "fail2"
|
| 92 |
#im2 = carTransforms(im).unsqueeze(0) # transform and add batch dimension
|
|
@@ -94,7 +93,7 @@ def classifyCar(im):
|
|
| 94 |
# scores = torch.nn.functional.softmax(DesignModernityModel(im2)[0])
|
| 95 |
#{LABELS[i]: float(scores[i]) for i in range(n_labels)}
|
| 96 |
#Image.fromarray(np.uint8(out.get_image())).convert('RGB')
|
| 97 |
-
return label,
|
| 98 |
|
| 99 |
#examples = [[example_img.jpg], [example_img2.jpg]] # must be uploaded in repo
|
| 100 |
|
|
|
|
| 86 |
im2 = carTransforms(im2)
|
| 87 |
|
| 88 |
label = "success"
|
|
|
|
| 89 |
except:
|
| 90 |
label = "fail2"
|
| 91 |
#im2 = carTransforms(im).unsqueeze(0) # transform and add batch dimension
|
|
|
|
| 93 |
# scores = torch.nn.functional.softmax(DesignModernityModel(im2)[0])
|
| 94 |
#{LABELS[i]: float(scores[i]) for i in range(n_labels)}
|
| 95 |
#Image.fromarray(np.uint8(out.get_image())).convert('RGB')
|
| 96 |
+
return label, im2
|
| 97 |
|
| 98 |
#examples = [[example_img.jpg], [example_img2.jpg]] # must be uploaded in repo
|
| 99 |
|