devdata commited on
Commit
6114b97
1 Parent(s): 4f08df7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
  from fastai.vision.all import *
3
  import skimage
 
4
 
5
  learn = load_learner('model.pkl')
6
 
@@ -11,8 +12,6 @@ def predict(img):
11
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
12
 
13
  examples = ['image.jpg']
14
- interpretation='default'
15
- enable_queue=True
16
 
17
  #gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
18
  gr.Interface(fn=predict,inputs=gr.components.Image(),outputs=gr.components.Label(num_top_classes=3),examples=examples,).launch()
 
1
  import gradio as gr
2
  from fastai.vision.all import *
3
  import skimage
4
+ from fastai.vision.all import PILImage
5
 
6
  learn = load_learner('model.pkl')
7
 
 
12
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
13
 
14
  examples = ['image.jpg']
 
 
15
 
16
  #gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
17
  gr.Interface(fn=predict,inputs=gr.components.Image(),outputs=gr.components.Label(num_top_classes=3),examples=examples,).launch()