Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -129,8 +129,7 @@ def Custom_detect(img):
|
|
129 |
cv2.waitKey(1)
|
130 |
|
131 |
if save_img:
|
132 |
-
if dataset.mode == 'image':
|
133 |
-
im0.shape
|
134 |
cv2.imwrite(save_path, im0)
|
135 |
else:
|
136 |
if vid_path != save_path:
|
@@ -157,7 +156,7 @@ inp = gr.Image(type="pil")
|
|
157 |
output = gr.Image(type="pil")
|
158 |
#gr.outputs.Image(type="filepath", label="Output")
|
159 |
#.outputs.Textbox() ,api_mode=True
|
160 |
-
css = ".output-image, .input-image {height: 40rem !important; width:
|
161 |
examples=[["Examples/Image1.jpg","Image1"],["Examples/Image2.jpg","Image2"],["Examples/Image29.jpg","Image3"]]
|
162 |
|
163 |
io=gr.Interface(fn=Custom_detect, inputs=inp, outputs=output, title='Pot Hole Detection With Custom YOLOv7',examples=examples,cache_examples=False,css=css)
|
|
|
129 |
cv2.waitKey(1)
|
130 |
|
131 |
if save_img:
|
132 |
+
if dataset.mode == 'image':
|
|
|
133 |
cv2.imwrite(save_path, im0)
|
134 |
else:
|
135 |
if vid_path != save_path:
|
|
|
156 |
output = gr.Image(type="pil")
|
157 |
#gr.outputs.Image(type="filepath", label="Output")
|
158 |
#.outputs.Textbox() ,api_mode=True
|
159 |
+
css = ".output-image, .input-image {height: 40rem !important; width: 20rem !important;}"
|
160 |
examples=[["Examples/Image1.jpg","Image1"],["Examples/Image2.jpg","Image2"],["Examples/Image29.jpg","Image3"]]
|
161 |
|
162 |
io=gr.Interface(fn=Custom_detect, inputs=inp, outputs=output, title='Pot Hole Detection With Custom YOLOv7',examples=examples,cache_examples=False,css=css)
|