Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ def predict(inp):
|
|
| 27 |
inp = Image.fromarray(inp.astype('uint8'), 'RGB')
|
| 28 |
inp = imgTransforms(inp).unsqueeze(0)
|
| 29 |
with torch.no_grad():
|
| 30 |
-
prediction = torch.nn.functional.softmax(model(inp)[0]
|
| 31 |
return {LABELS[i]: float(prediction[i]) for i in range(2)}
|
| 32 |
|
| 33 |
examples = [['fiat500.jpg'],['VWUP.jpg']]
|
|
|
|
| 27 |
inp = Image.fromarray(inp.astype('uint8'), 'RGB')
|
| 28 |
inp = imgTransforms(inp).unsqueeze(0)
|
| 29 |
with torch.no_grad():
|
| 30 |
+
prediction = torch.nn.functional.softmax(model(inp)[0])
|
| 31 |
return {LABELS[i]: float(prediction[i]) for i in range(2)}
|
| 32 |
|
| 33 |
examples = [['fiat500.jpg'],['VWUP.jpg']]
|