Antoine245 commited on
Commit
20372b6
·
1 Parent(s): 3ab5bd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -22,7 +22,7 @@ description = """
22
  iface = gr.Interface(
23
  fn=predict,
24
  inputs=[
25
- gr.components.Image(label="Image to classify", type="pil"),
26
  ],
27
  outputs=gr.outputs.JSON(),
28
  title="Image Classifier",
@@ -30,6 +30,6 @@ iface = gr.Interface(
30
  )
31
 
32
  # Apply custom formatting to the JSON output
33
- iface.outputs[0].format = format_output
34
 
35
  iface.launch()
 
22
  iface = gr.Interface(
23
  fn=predict,
24
  inputs=[
25
+ gr.inputs.Image(label="Image to classify", type="pil"),
26
  ],
27
  outputs=gr.outputs.JSON(),
28
  title="Image Classifier",
 
30
  )
31
 
32
  # Apply custom formatting to the JSON output
33
+ iface.output_formatter = format_output
34
 
35
  iface.launch()