miwojc commited on
Commit
520d98a
·
1 Parent(s): 7e76094

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -8,8 +8,6 @@ labels = learn.dls.vocab
8
 
9
  def predict(img):
10
  img = PILImage.create(img)
11
- size = (224, 224)
12
- img = img.thumbnail(size, Image.ANTIALIAS)
13
  _pred, _pred_w_idx, probs = learn.predict(img)
14
  # gradio doesn't support tensors, so converting to float
15
  labels_probs = {labels[i]: float(probs[i]) for i, _ in enumerate(labels)}
 
8
 
9
  def predict(img):
10
  img = PILImage.create(img)
 
 
11
  _pred, _pred_w_idx, probs = learn.predict(img)
12
  # gradio doesn't support tensors, so converting to float
13
  labels_probs = {labels[i]: float(probs[i]) for i, _ in enumerate(labels)}