Aumkeshchy2003 commited on
Commit
9562b5e
·
verified ·
1 Parent(s): 73a50c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -11
app.py CHANGED
@@ -6,15 +6,7 @@ from ultralytics import YOLO
6
  model = YOLO("best (1).pt")
7
 
8
  def detect(image):
9
- """
10
- Runs object detection on the input image.
11
-
12
- Args:
13
- image: A numpy array representing the input image.
14
-
15
- Returns:
16
- Annotated image as a numpy array.
17
- """
18
  # Run inference
19
  results = model(image)
20
 
@@ -27,8 +19,9 @@ iface = gr.Interface(
27
  fn=detect,
28
  inputs=gr.Image(type="numpy", label="Input Image"),
29
  outputs=gr.Image(type="numpy", label="Detection Output"),
30
- title="YOLOv8n Object Detection",
31
- description="Upload an image and the model will detect objects using YOLOv8n."
 
32
  )
33
 
34
  # Launch the interface (Hugging Face Spaces will automatically run the app)
 
6
  model = YOLO("best (1).pt")
7
 
8
  def detect(image):
9
+
 
 
 
 
 
 
 
 
10
  # Run inference
11
  results = model(image)
12
 
 
19
  fn=detect,
20
  inputs=gr.Image(type="numpy", label="Input Image"),
21
  outputs=gr.Image(type="numpy", label="Detection Output"),
22
+ title="Solar Panel Detection",
23
+ description="Upload an image, and the model will detect the Solar Panels.",
24
+ examples=["Aumkeshchy2003/Solar_Panel_detection", "solarpanels_native_3__x0_10924_y0_9818_dxdy_416.jpg"]
25
  )
26
 
27
  # Launch the interface (Hugging Face Spaces will automatically run the app)