Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,13 @@ os.system('git clone https://github.com/WongKinYiu/yolov7.git')
|
|
6 |
|
7 |
def detect(inp):
|
8 |
os.system('python ./yolov7/detect.py --weights ./yolov7/runs/train/yolov7/weights/best.pt --conf 0.25 --img-size 640 --source f{inp} "--project","./yolov7/runs/detect ')
|
9 |
-
otp=inp.split('/')[2]
|
10 |
-
return
|
|
|
11 |
|
12 |
inp = gr.inputs.Image(type="filepath", label="Input")
|
13 |
-
output = gr.outputs.
|
14 |
-
#Image(type="filepath", label="Output")
|
15 |
|
16 |
|
17 |
io=gr.Interface(fn=detect, inputs=inp, outputs=output, title='Pot Hole Detection With Custom YOLOv7 ',)
|
|
|
6 |
|
7 |
def detect(inp):
|
8 |
os.system('python ./yolov7/detect.py --weights ./yolov7/runs/train/yolov7/weights/best.pt --conf 0.25 --img-size 640 --source f{inp} "--project","./yolov7/runs/detect ')
|
9 |
+
#otp=inp.split('/')[2]
|
10 |
+
return inp.split('/')
|
11 |
+
#f"./yolov7/runs/detect/exp/{otp}"
|
12 |
|
13 |
inp = gr.inputs.Image(type="filepath", label="Input")
|
14 |
+
output = gr.outputs.Textbox()
|
15 |
+
#gr.outputs.Image(type="filepath", label="Output")
|
16 |
|
17 |
|
18 |
io=gr.Interface(fn=detect, inputs=inp, outputs=output, title='Pot Hole Detection With Custom YOLOv7 ',)
|