Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,7 @@ def classifyCar(im):
|
|
| 55 |
im = Image.fromarray(im.astype('uint8'), 'RGB')
|
| 56 |
im = carTransforms(im).unsqueeze(0) # transform and add batch dimension
|
| 57 |
with torch.no_grad():
|
| 58 |
-
scores = torch.nn.functional.softmax(
|
| 59 |
return {LABELS[i]: float(scores[i]) for i in range(2)}
|
| 60 |
|
| 61 |
#examples = [[example_img.jpg], [example_img2.jpg]] # must be uploaded in repo
|
|
|
|
| 55 |
im = Image.fromarray(im.astype('uint8'), 'RGB')
|
| 56 |
im = carTransforms(im).unsqueeze(0) # transform and add batch dimension
|
| 57 |
with torch.no_grad():
|
| 58 |
+
scores = torch.nn.functional.softmax(DesignModernityModel(im)[0])
|
| 59 |
return {LABELS[i]: float(scores[i]) for i in range(2)}
|
| 60 |
|
| 61 |
#examples = [[example_img.jpg], [example_img2.jpg]] # must be uploaded in repo
|