Sa-m's picture
Update app.py
b3ce859
raw
history blame
559 Bytes
import gradio as gr
import os
os.system('git clone https://github.com/WongKinYiu/yolov7.git')
def detect(inp):
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 ')
return inp
inp = gr.inputs.Image(type="pil", label="Original Image")
output = gr.outputs.Image(type="pil", label="Output Image")
io=gr.Interface(fn=detect, inputs=inp, outputs=output, title='Pot Hole Detection With Custom YOLOv7 ',)
io.launch(debug=True,share=False)