NicolasvonRotz commited on
Commit
cb8326d
·
1 Parent(s): 407a4df
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import gradio as gr
2
  from gradio.mix import Parallel
3
  from fastai.vision.all import load_learner
4
- from gradio.components import Output
5
 
6
  def classify_image_color(img):
7
  from fastai.vision.all import load_learner
@@ -29,14 +28,14 @@ def postprocess(prediction):
29
  sorted_pred = sorted(prediction.items(), key=lambda x: x[1], reverse=True)
30
  return sorted_pred
31
 
32
- image = gr.inputs.Image(shape=(256, 256))
33
 
34
- output_json = Output(label="JSON Output")
 
35
 
36
  intf = gr.Interface(
37
  fn=classify_image,
38
  inputs=image,
39
- outputs=output_json,
40
  examples="",
41
  title="Lego Brick Classifier",
42
  layout="vertical"
 
1
  import gradio as gr
2
  from gradio.mix import Parallel
3
  from fastai.vision.all import load_learner
 
4
 
5
  def classify_image_color(img):
6
  from fastai.vision.all import load_learner
 
28
  sorted_pred = sorted(prediction.items(), key=lambda x: x[1], reverse=True)
29
  return sorted_pred
30
 
 
31
 
32
+ image = gr.inputs.Image(shape=(256, 256))
33
+ label = gr.outputs.Label()
34
 
35
  intf = gr.Interface(
36
  fn=classify_image,
37
  inputs=image,
38
+ outputs=label,
39
  examples="",
40
  title="Lego Brick Classifier",
41
  layout="vertical"