bonosa commited on
Commit
ec61e8d
Β·
1 Parent(s): b94c896

work damn you!

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -1,14 +1,18 @@
1
 
2
  from fastai.vision.all import *
3
- import gradio as gr
 
 
 
 
4
  # 4. Create a Gradio interface
5
  def predict_parrot_species(image):
6
  learn_inf = load_learner('export1.pkl')
7
  pred, _, _ = learn_inf.predict(image)
8
  return pred
9
 
10
- input_image = gr.inputs.Image(shape=(224, 224))
11
- output_label = gr.outputs.Label()
12
 
13
- gr_interface = gr.Interface(fn=predict_parrot_species, inputs=input_image, outputs=output_label)
14
- gr_interface = gr.Interface(fn=predict_parrot_species, inputs=input_image, outputs=output_label)
 
1
 
2
  from fastai.vision.all import *
3
+ import gradio
4
+ from gradio.inputs import *
5
+ from gradio.outputs import *
6
+ from gradio import Interface, File
7
+
8
  # 4. Create a Gradio interface
9
  def predict_parrot_species(image):
10
  learn_inf = load_learner('export1.pkl')
11
  pred, _, _ = learn_inf.predict(image)
12
  return pred
13
 
14
+ input_image = gradio.inputs.Image(shape=(224, 224))
15
+ output_label = gradio.outputs.Label()
16
 
17
+ gr_interface = gradio.Interface(fn=predict_parrot_species, inputs=input_image, outputs=output_label)
18
+ gr_interface = gradio.Interface(fn=predict_parrot_species, inputs=input_image, outputs=output_label)