Noah Vriese commited on
Commit
5e7405a
·
1 Parent(s): f763c3b

Update gradio output arg ordering

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -73,7 +73,7 @@ def predict(input_img):
73
 
74
  json_file, json_text = generate_json(detected_objects)
75
 
76
- return input_img, {obj.display_name: obj.score for obj in detected_objects}, json_text, json_file
77
 
78
  example_images = [
79
  os.path.join("./examples", img) for img in os.listdir("./examples") if img.lower().endswith(('png', 'jpg', 'jpeg'))
@@ -85,8 +85,8 @@ gradio_app = gr.Interface(
85
  outputs=[
86
  gr.Image(label="Processed Image"),
87
  gr.Label(label="Result", num_top_classes=2),
88
- gr.Textbox(label="Copy JSON Text", lines=10),
89
- gr.File(label="Download JSON")
90
  ],
91
  title="License Plate Detection",
92
  examples=example_images,
 
73
 
74
  json_file, json_text = generate_json(detected_objects)
75
 
76
+ return input_img, {obj.display_name: obj.score for obj in detected_objects}, json_file, json_text
77
 
78
  example_images = [
79
  os.path.join("./examples", img) for img in os.listdir("./examples") if img.lower().endswith(('png', 'jpg', 'jpeg'))
 
85
  outputs=[
86
  gr.Image(label="Processed Image"),
87
  gr.Label(label="Result", num_top_classes=2),
88
+ gr.File(label="Download JSON"),
89
+ gr.Textbox(label="Copy JSON Text", lines=10)
90
  ],
91
  title="License Plate Detection",
92
  examples=example_images,