Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,12 +30,12 @@ if file_name is not None:
|
|
| 30 |
|
| 31 |
bbox,confidance,classes,nc = model(input_image)
|
| 32 |
bbox,confidance , classes , nc = bbox[0].numpy(),confidance[0].numpy(),classes[0].numpy(),nc[0].numpy()
|
| 33 |
-
|
| 34 |
for i in range(nc):
|
| 35 |
if confidance[i] >= threshold:
|
| 36 |
x1,y1,x2,y2 = bbox[i]*640
|
| 37 |
class_name = labels[int(classes[i])]
|
| 38 |
-
st.
|
| 39 |
if class_name =="Header":
|
| 40 |
color = (0,0,255) #Blue color
|
| 41 |
cv2.rectangle(copy_img, (int(x1), int(y1)), (int(x2), int(y2)),color, 2)
|
|
|
|
| 30 |
|
| 31 |
bbox,confidance,classes,nc = model(input_image)
|
| 32 |
bbox,confidance , classes , nc = bbox[0].numpy(),confidance[0].numpy(),classes[0].numpy(),nc[0].numpy()
|
| 33 |
+
st.subheader("Detected Result")
|
| 34 |
for i in range(nc):
|
| 35 |
if confidance[i] >= threshold:
|
| 36 |
x1,y1,x2,y2 = bbox[i]*640
|
| 37 |
class_name = labels[int(classes[i])]
|
| 38 |
+
st.title(class_name)
|
| 39 |
if class_name =="Header":
|
| 40 |
color = (0,0,255) #Blue color
|
| 41 |
cv2.rectangle(copy_img, (int(x1), int(y1)), (int(x2), int(y2)),color, 2)
|