shewster commited on
Commit
bbbfb8e
1 Parent(s): c91b23c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -8,14 +8,13 @@ def load_model():
8
  return learn
9
 
10
  learn = load_model()
11
-
12
  # Define prediction function
13
  def predict_image(img):
14
  pred, pred_idx, probs = learn.predict(img)
15
  return {learn.dls.vocab[i]: float(probs[i]) for i in range(len(learn.dls.vocab))}
16
 
17
  # Create a Gradio interface
18
- gr.Interface(fn=classify_image,inputs=gr.Image(type=“pil),outputs=gr.Label())
19
 
20
  if __name__ == "__main__":
21
  interface.launch()
 
8
  return learn
9
 
10
  learn = load_model()
 
11
  # Define prediction function
12
  def predict_image(img):
13
  pred, pred_idx, probs = learn.predict(img)
14
  return {learn.dls.vocab[i]: float(probs[i]) for i in range(len(learn.dls.vocab))}
15
 
16
  # Create a Gradio interface
17
+ gr.Interface(fn=classify_image,inputs=gr.Image(type= "pil"),outputs=gr.Label())
18
 
19
  if __name__ == "__main__":
20
  interface.launch()