ManjunathReddy/Yolo3_from_scratch
0
1import numpy as np2import gradio as gr3from src.detect import predict4 5gr.Interface(6 predict,7 inputs=[8 gr.Image(label="Input Image"),9 gr.Slider(0, 1, value=0.5, label="IOU Threshold"),10 gr.Slider(0, 1, value=0.4, label="Threshold"),11 gr.Checkbox(label="Show Grad Cam"),12 gr.Slider(0, 1, value=0.5, label="Opacity of GradCAM"),13 ],14 outputs=gr.Gallery(rows=2, columns=1),15 title="YoloV3 on PASCAL VOC Dataset From Scratch (Slide for GradCam output)",16 examples=[17 ["example_images/009922.jpg", 0.5, 0.4, True, 0.5],18 ["example_images/009938.jpg", 0.6, 0.5, True, 0.5],19 ["example_images/009948.jpg", 0.55, 0.45, True, 0.5],20 ["example_images/009952.jpg", 0.5, 0.4, True, 0.5],21 ["example_images/009953.jpg", 0.6, 0.7, True, 0.5],22 ["example_images/009956.jpg", 0.5, 0.4, True, 0.5],23 ["example_images/009957.jpg", 0.6, 0.5, True, 0.5],24 ["example_images/009960.jpg", 0.55, 0.45, True, 0.5],25 ["example_images/009961.jpg", 0.5, 0.4, True, 0.5],26 ["example_images/009962.jpg", 0.6, 0.7, True, 0.5],27 ],28 layout="horizontal"29).launch()