Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def predict_image(image_input):
|
|
21 |
results = outputs[0].cpu().numpy()
|
22 |
|
23 |
for i, det in enumerate(results.boxes.xyxy):
|
24 |
-
cv2.rectangle(image, (int(det[0]), int(det[1])), (int(det[2]), int(det[3])), color=(0, 0, 255), thickness=2, lineType=cv2.
|
25 |
|
26 |
return cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
27 |
|
@@ -31,4 +31,4 @@ outputs_image = [gr.components.Image(type="numpy", label="Output Image")]
|
|
31 |
|
32 |
interface_image = gr.Interface(fn = predict_image, inputs=inputs_image, outputs=outputs_image,title="Fire & Smoke Detector", cache_examples=False)
|
33 |
|
34 |
-
interface_image.launch()
|
|
|
21 |
results = outputs[0].cpu().numpy()
|
22 |
|
23 |
for i, det in enumerate(results.boxes.xyxy):
|
24 |
+
cv2.rectangle(image, (int(det[0]), int(det[1])), (int(det[2]), int(det[3])), color=(0, 0, 255), thickness=2, lineType=cv2.LINE_AA)
|
25 |
|
26 |
return cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
27 |
|
|
|
31 |
|
32 |
interface_image = gr.Interface(fn = predict_image, inputs=inputs_image, outputs=outputs_image,title="Fire & Smoke Detector", cache_examples=False)
|
33 |
|
34 |
+
interface_image.launch(debug=True)
|