deepBiz commited on
Commit
9f93a31
·
1 Parent(s): 6a4757a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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], dim=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']]