Ayesha352 commited on
Commit
f65faf2
·
verified ·
1 Parent(s): 17b56ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -90,7 +90,7 @@ def alpr_color_inference(image):
90
  detection_results = (f"Detected {len(results)} license plate(s): {', '.join(plate_texts)}"
91
  if results else "No license plate detected 😔.")
92
 
93
- return annotated_img, cropped_img, cropped_img, f"{detection_results}\nVehicle Color: {color_text}"
94
 
95
  # ------------------ Gradio UI ------------------
96
  with gr.Blocks() as demo:
@@ -101,13 +101,10 @@ with gr.Blocks() as demo:
101
  submit_btn = gr.Button("Run Detection")
102
  gr.Examples(
103
  examples=[
104
- "examples/car8.jpg",
105
  "examples/car2.jpg",
106
  "examples/car3.jpg",
107
  "examples/car4.jpg",
108
- "examples/car5.jpg",
109
- "examples/car6.jpg",
110
- "examples/car7.jpg",
111
  ],
112
  inputs=[image_input],
113
  label="Example Images"
@@ -123,7 +120,5 @@ with gr.Blocks() as demo:
123
  outputs=[plate_output, cropped_output, result_text]
124
  )
125
 
126
-
127
-
128
  if __name__ == "__main__":
129
  demo.launch(share=True)
 
90
  detection_results = (f"Detected {len(results)} license plate(s): {', '.join(plate_texts)}"
91
  if results else "No license plate detected 😔.")
92
 
93
+ return annotated_img, cropped_img, f"{detection_results}\nVehicle Color: {color_text}"
94
 
95
  # ------------------ Gradio UI ------------------
96
  with gr.Blocks() as demo:
 
101
  submit_btn = gr.Button("Run Detection")
102
  gr.Examples(
103
  examples=[
104
+ "examples/car1.jpg",
105
  "examples/car2.jpg",
106
  "examples/car3.jpg",
107
  "examples/car4.jpg",
 
 
 
108
  ],
109
  inputs=[image_input],
110
  label="Example Images"
 
120
  outputs=[plate_output, cropped_output, result_text]
121
  )
122
 
 
 
123
  if __name__ == "__main__":
124
  demo.launch(share=True)