moshel commited on
Commit
858ba7e
·
1 Parent(s): 61278d5
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ def predict(inp):
16
  img = transforms.ToTensor()(inp)
17
  img = torchvision.transforms.Resize((800, 800))(img)
18
  img = torchvision.transforms.CenterCrop(CROP)(img)
19
- img = img..unsqueeze(0)
20
  with torch.no_grad():
21
  prediction = torch.nn.functional.softmax(model(img)[0], dim=0)
22
  confidences = {labels[i]: float(prediction[i]) for i in range(2)}
 
16
  img = transforms.ToTensor()(inp)
17
  img = torchvision.transforms.Resize((800, 800))(img)
18
  img = torchvision.transforms.CenterCrop(CROP)(img)
19
+ img = img.unsqueeze(0)
20
  with torch.no_grad():
21
  prediction = torch.nn.functional.softmax(model(img)[0], dim=0)
22
  confidences = {labels[i]: float(prediction[i]) for i in range(2)}