vebie91 commited on
Commit
ce4b1c7
·
verified ·
1 Parent(s): 06ec225

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -4,7 +4,7 @@ from PIL import Image
4
 
5
  # Load the exported fastai Learner
6
  learn = load_learner('model.pkl')
7
- labels = learn.dls.vocab # e.g. ['bird', 'shark']
8
 
9
  # Prediction function
10
  def predict(img):
@@ -21,11 +21,10 @@ examples = ['shark.jpg', 'bird.jpg']
21
  # Launch the Gradio interface
22
  gr.Interface(
23
  fn=predict,
24
- inputs=gr.Image(type="pil"), # <-- removed shape
25
  outputs=gr.Label(num_top_classes=2),
26
  title=title,
27
  description=description,
28
  examples=examples,
29
- interpretation='default',
30
  allow_flagging='never'
31
  ).launch()
 
4
 
5
  # Load the exported fastai Learner
6
  learn = load_learner('model.pkl')
7
+ labels = learn.dls.vocab # ['bird', 'shark']
8
 
9
  # Prediction function
10
  def predict(img):
 
21
  # Launch the Gradio interface
22
  gr.Interface(
23
  fn=predict,
24
+ inputs=gr.Image(type="pil"),
25
  outputs=gr.Label(num_top_classes=2),
26
  title=title,
27
  description=description,
28
  examples=examples,
 
29
  allow_flagging='never'
30
  ).launch()