Timjo88 commited on
Commit
ec26715
·
1 Parent(s): bb8ed6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,15 +1,15 @@
1
  import gradio
2
  from fastai.vision.all import *
3
 
4
- lern = load_learner('model.pkl')
5
 
6
  labels = learn.dls.vocab
7
 
8
  def predict(img):
9
  pred,idx,probs = learn.predict(img)
10
- return {labels[i]: float(probs[i]) for i,_ in enumarate(labels))}
11
 
12
- image = gr.inputs.Image(shape(256,256))
13
  label = gr.outputs.Label()
14
  examples = ['house1.jpg','house2.jpg','house3.jpg','house4.jpg','house5.jpg']
15
 
 
1
  import gradio
2
  from fastai.vision.all import *
3
 
4
+ learn = load_learner('model.pkl')
5
 
6
  labels = learn.dls.vocab
7
 
8
  def predict(img):
9
  pred,idx,probs = learn.predict(img)
10
+ return {labels[i]: float(probs[i]) for i,_ in enumerate(labels))}
11
 
12
+ image = gr.inputs.Image(shape=(256,256))
13
  label = gr.outputs.Label()
14
  examples = ['house1.jpg','house2.jpg','house3.jpg','house4.jpg','house5.jpg']
15