malmal commited on
Commit
5d077dc
1 Parent(s): 3866f68

Remove formatting from output

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -7,8 +7,7 @@ labels = model.dls.vocab
7
  def predict_dog_breed(img):
8
  img = PILImage.create(img)
9
  pred, pred_idx, probs = model.predict(img)
10
- all_breed_probabilities = { labels[i].replace('_', ' ').title(): float(probs[i]) for i in range(len(labels)) }
11
- return all_breed_probabilities
12
 
13
  title = "Dog Breed Identifier"
14
  description = "Dog Breed Identifier. Upload an image of a dog and this application will identify the breed of the dog"
 
7
  def predict_dog_breed(img):
8
  img = PILImage.create(img)
9
  pred, pred_idx, probs = model.predict(img)
10
+ return { labels[i]: float(probs[i]) for i in range(len(labels)) }
 
11
 
12
  title = "Dog Breed Identifier"
13
  description = "Dog Breed Identifier. Upload an image of a dog and this application will identify the breed of the dog"