cls00 commited on
Commit
c3894e2
·
verified ·
1 Parent(s): a09c80a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -17,7 +17,6 @@ learn = load_learner('resnet50_10epochs.pkl')
17
  categories = ['city','town','countryside','ocean']
18
 
19
  def classify_image(img):
20
- img = img.resize((128,128))
21
  pred, idx, probs = learn.predict(img)
22
  ret = dict(
23
  zip(categories,
@@ -29,8 +28,8 @@ def classify_image(img):
29
  # %% ../app.ipynb 8
30
  im_size = 128
31
 
32
- #image = gr.inputs.Image(shape=(im_size,im_size))
33
- #label = gr.outputs.Label()
34
  examples = ['city.jpg',
35
  'town.jpg',
36
  'countryside.jpg',
 
17
  categories = ['city','town','countryside','ocean']
18
 
19
  def classify_image(img):
 
20
  pred, idx, probs = learn.predict(img)
21
  ret = dict(
22
  zip(categories,
 
28
  # %% ../app.ipynb 8
29
  im_size = 128
30
 
31
+ image = gr.Image(shape=(im_size,im_size))
32
+ label = gr.Label()
33
  examples = ['city.jpg',
34
  'town.jpg',
35
  'countryside.jpg',