PDG commited on
Commit
b9f84d6
·
1 Parent(s): 577b47c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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(model(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
 
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