Laks Srini commited on
Commit
6d7a35a
1 Parent(s): beb11ab

Fix examples

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -26,9 +26,15 @@ def classify_img(img, use_conv):
26
 
27
 
28
  # %% app.ipynb 7
29
- image = gr.inputs.Image(shape=(240, 320))
30
- label = gr.outputs.Label()
31
- examples = ["kitchen.jpg", "living_room.jpg", "living_room2.jpg"]
 
 
 
 
 
 
32
 
33
  intf = gr.Interface(
34
  fn=classify_img,
@@ -36,7 +42,9 @@ intf = gr.Interface(
36
  gr.components.Image(type="pil", shape=(640, 480)),
37
  gr.components.Checkbox(label="Use conv model", value=False),
38
  ],
39
- outputs=label,
 
 
40
  examples=examples
41
  )
42
  intf.launch(inline=False)
 
26
 
27
 
28
  # %% app.ipynb 7
29
+
30
+ examples = [
31
+ ["kitchen.jpg", False],
32
+ ["living_room.jpg", False],
33
+ ["living_room2.jpg", False],
34
+ ["kitchen.jpg", True],
35
+ ["living_room.jpg", True],
36
+ ["living_room2.jpg", True]
37
+ ]
38
 
39
  intf = gr.Interface(
40
  fn=classify_img,
 
42
  gr.components.Image(type="pil", shape=(640, 480)),
43
  gr.components.Checkbox(label="Use conv model", value=False),
44
  ],
45
+ outputs=[
46
+ gr.components.Label()
47
+ ],
48
  examples=examples
49
  )
50
  intf.launch(inline=False)