fierce74 commited on
Commit
d14064e
1 Parent(s): 83ec89a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -10,12 +10,13 @@ def classify_img(img):
10
  pred, idx, probs = learn.predict(img)
11
  return dict(zip(categories, map(float,probs)))
12
 
13
- image = gr.inputs.Image(shape=(192,192))
14
  label = gr.outputs.Label()
15
- examples = ['elliptical.jpg', 'irregular.jpg', 'spiral.jpg']
 
16
  for img in examples:
17
  img = Image.open(img)
18
- img = img.resize((192,192), Image.NEAREST)
19
-
20
  iface = gr.Interface(fn = classify_img, inputs = image, outputs = label, title = 'Galaxy Classifier', examples = examples)
21
  iface.launch()
 
10
  pred, idx, probs = learn.predict(img)
11
  return dict(zip(categories, map(float,probs)))
12
 
13
+ image = gr.inputs.Image(shape=(224,224))
14
  label = gr.outputs.Label()
15
+ e = ['elliptical.jpg', 'irregular.jpg', 'spiral.jpg']
16
+ examples = []
17
  for img in examples:
18
  img = Image.open(img)
19
+ img = img.resize((224,224), Image.NEAREST)
20
+ examples.append(img)
21
  iface = gr.Interface(fn = classify_img, inputs = image, outputs = label, title = 'Galaxy Classifier', examples = examples)
22
  iface.launch()