yuhe6 commited on
Commit
68fdef8
·
1 Parent(s): 01bed2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -44,8 +44,12 @@ def inference(input_image):
44
  # Read the categories
45
  #with open("dog_cat.txt", "r") as f:
46
  #categories = [s.strip() for s in f.readlines()]
47
- with open("dog_cat.txt", "r") as f:
48
- categories = [s.strip() for s in f.readlines()]
 
 
 
 
49
  # Show top categories per image
50
  top5_prob, top5_catid = torch.topk(probabilities, 2)
51
  result = {}
 
44
  # Read the categories
45
  #with open("dog_cat.txt", "r") as f:
46
  #categories = [s.strip() for s in f.readlines()]
47
+ #with open("dog_cat.txt", "r") as f:
48
+ categories = []
49
+ categories.append("cat")
50
+ categories.append("dog")
51
+
52
+ #categories = [s.strip() for s in f.readlines()]
53
  # Show top categories per image
54
  top5_prob, top5_catid = torch.topk(probabilities, 2)
55
  result = {}