arupchakraborty2004 commited on
Commit
44c2dbe
·
verified ·
1 Parent(s): a82d3ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -85,7 +85,7 @@ def gradio_video_processor(video):
85
 
86
  if cropped_plate_path and plate_text:
87
  html_result = f"<h3>Detected License Plate</h3>"
88
- html_result += f"<p><b>Plate:</b> {plate_text}</p><img src='{cropped_plate_path}' width='300'><br>"
89
  return cropped_plate_path, html_result
90
  else:
91
  return None, "<h3>No license plate detected in the video.</h3>"
@@ -96,6 +96,7 @@ iface = gr.Interface(
96
  inputs=gr.Video(label="Upload a Video to detect license plate"),
97
  outputs=[
98
  gr.Image(label="Cropped Plate Image"), # Shows the cropped plate
 
99
  ],
100
  title="License Plate Detection",
101
  description="Upload a video to detect the first license plate and extract its text."
 
85
 
86
  if cropped_plate_path and plate_text:
87
  html_result = f"<h3>Detected License Plate</h3>"
88
+ html_result += f"<p></p><img src='{cropped_plate_path}' width='300'><br>"
89
  return cropped_plate_path, html_result
90
  else:
91
  return None, "<h3>No license plate detected in the video.</h3>"
 
96
  inputs=gr.Video(label="Upload a Video to detect license plate"),
97
  outputs=[
98
  gr.Image(label="Cropped Plate Image"), # Shows the cropped plate
99
+ gr.HTML(label="License Plate Detected") # Shows the extracted text
100
  ],
101
  title="License Plate Detection",
102
  description="Upload a video to detect the first license plate and extract its text."