Dricz commited on
Commit
6d29c3c
1 Parent(s): 0f835e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -21,7 +21,10 @@ def response(image):
21
  conf = np.array(r.boxes.conf)
22
  cls = np.array(r.boxes.cls)
23
  cls = cls.astype(int)
24
- for con, cl in zip(conf,cls):
 
 
 
25
  con = con.astype(float)
26
  con = round(con,3)
27
  con = con * 100
@@ -68,7 +71,7 @@ inputs = [
68
 
69
 
70
  outputs = [gr.Image( type="filepath", label="Output Image"),
71
- gr.Textbox()
72
  ]
73
 
74
  title = "YOLOv8 Custom Object Detection by Uyen Nguyen"
 
21
  conf = np.array(r.boxes.conf)
22
  cls = np.array(r.boxes.cls)
23
  cls = cls.astype(int)
24
+ xywh = np.array(r.boxes.xywh)
25
+ xywh = xywh.astype(int)
26
+
27
+ for con, cl, xy in zip(conf, cls, xywh):
28
  con = con.astype(float)
29
  con = round(con,3)
30
  con = con * 100
 
71
 
72
 
73
  outputs = [gr.Image( type="filepath", label="Output Image"),
74
+ gr.Textbox(label="Result")
75
  ]
76
 
77
  title = "YOLOv8 Custom Object Detection by Uyen Nguyen"