stevafernandes commited on
Commit
29a423a
·
verified ·
1 Parent(s): ddd7d44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -30,9 +30,9 @@ COLORS = [
30
 
31
 
32
  def load_model():
33
- """Load pretrained YOLOv9 model from KerasCV."""
34
- model = keras_cv.models.YOLOV9Detector.from_preset(
35
- "yolo_v9_m_pascalvoc",
36
  bounding_box_format="xyxy",
37
  )
38
  return model
@@ -120,8 +120,8 @@ def detect_objects(image, confidence_threshold=0.5):
120
 
121
  # Build the Gradio interface
122
  with gr.Blocks(title="Keras Object Detection") as demo:
123
- gr.Markdown("# Object Detection with KerasCV YOLOv9")
124
- gr.Markdown("Upload an image to detect objects using a pretrained YOLOv9 model.")
125
 
126
  with gr.Row():
127
  with gr.Column():
 
30
 
31
 
32
  def load_model():
33
+ """Load pretrained YOLOv8 model from KerasCV."""
34
+ model = keras_cv.models.YOLOV8Detector.from_preset(
35
+ "yolo_v8_m_pascalvoc",
36
  bounding_box_format="xyxy",
37
  )
38
  return model
 
120
 
121
  # Build the Gradio interface
122
  with gr.Blocks(title="Keras Object Detection") as demo:
123
+ gr.Markdown("# Object Detection with KerasCV YOLOv8")
124
+ gr.Markdown("Upload an image to detect objects using a pretrained YOLOv8 model.")
125
 
126
  with gr.Row():
127
  with gr.Column():