akhaliq HF staff commited on
Commit
d84cbcc
1 Parent(s): 6600dac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ def inference(input_image):
29
  # The output has unnormalized scores. To get probabilities, you can run a softmax on it.
30
  probabilities = torch.nn.functional.softmax(output[0], dim=0)
31
  # Download ImageNet labels
32
- !wget https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt
33
  # Read the categories
34
  with open("imagenet_classes.txt", "r") as f:
35
  categories = [s.strip() for s in f.readlines()]
 
29
  # The output has unnormalized scores. To get probabilities, you can run a softmax on it.
30
  probabilities = torch.nn.functional.softmax(output[0], dim=0)
31
  # Download ImageNet labels
32
+ os.system("wget https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt")
33
  # Read the categories
34
  with open("imagenet_classes.txt", "r") as f:
35
  categories = [s.strip() for s in f.readlines()]