Chong-U Lim commited on
Commit
c2a1944
·
1 Parent(s): a671552
Files changed (2) hide show
  1. app.py +3 -3
  2. requirements.txt +0 -1
app.py CHANGED
@@ -1,6 +1,6 @@
1
  __all__ = ['is_cat', 'learn', 'classify_image', 'categories', 'image', 'label', 'examples', 'intf']
2
 
3
- from fastai.vision.all import *
4
  import gradio as gr
5
 
6
  def is_cat(x): return x[0].isupper()
@@ -13,8 +13,8 @@ def classify_image(img):
13
  pred, idx, probs = learn.predict(img)
14
  return dict(zip(categories, map(float, probs)))
15
 
16
- image = gr.inputs.Image(shape=(192,192))
17
- label = gr.outputs.label()
18
 
19
  examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
20
 
 
1
  __all__ = ['is_cat', 'learn', 'classify_image', 'categories', 'image', 'label', 'examples', 'intf']
2
 
3
+ from fastai.vision.all import load_learner
4
  import gradio as gr
5
 
6
  def is_cat(x): return x[0].isupper()
 
13
  pred, idx, probs = learn.predict(img)
14
  return dict(zip(categories, map(float, probs)))
15
 
16
+ image = gr.components.Image(shape=(192,192))
17
+ label = gr.components.label()
18
 
19
  examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
20
 
requirements.txt CHANGED
@@ -1,2 +1 @@
1
- gradio==3.50
2
  fastai
 
 
1
  fastai