pupunpu commited on
Commit
296ed7e
·
verified ·
1 Parent(s): ee06934

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from fastai.vision.all import *
2
  import gradio as gr
3
 
4
  def is_cat(x):
@@ -11,13 +11,11 @@ def classify_image(img):
11
  pred, idx, probs = learn.predict(img)
12
  return dict(zip(categorieries, map(float, probs)))
13
 
14
- image = gr.inputs.Image(shape=(192, 192))
15
- label = gr.outputs.Label()
16
-
17
  intf = gr.Interface(
18
  fn=classify_image,
19
- inputs=image,
20
- outputs=label
 
21
  )
22
 
23
- intf.launch(inline=False)
 
1
+ Copyfrom fastai.vision.all import *
2
  import gradio as gr
3
 
4
  def is_cat(x):
 
11
  pred, idx, probs = learn.predict(img)
12
  return dict(zip(categorieries, map(float, probs)))
13
 
 
 
 
14
  intf = gr.Interface(
15
  fn=classify_image,
16
+ inputs=gr.Image(),
17
+ outputs=gr.Label(),
18
+ title="Dog vs Cat Classifier"
19
  )
20
 
21
+ intf.launch(inline=False