chun
commited on
Commit
•
06bb803
1
Parent(s):
b3d671b
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,10 @@ import gradio as gr
|
|
3 |
|
4 |
|
5 |
model = torch.hub.load('./', 'custom', 'best.pt',force_reload=True, source='local',trust_repo=True)
|
6 |
-
examples=[["photo/a.jpg","Image1"],["photo/b.jpg","Image2"],
|
|
|
|
|
|
|
7 |
|
8 |
io=gr.Interface(fn=lambda img:model(img).render()[0],inputs=["image"],title="Yolov7 Custom Object Detection",examples=examples,outputs=["image"],).launch()
|
9 |
io.launch()
|
|
|
3 |
|
4 |
|
5 |
model = torch.hub.load('./', 'custom', 'best.pt',force_reload=True, source='local',trust_repo=True)
|
6 |
+
examples=[["photo/a.jpg","Image1"],["photo/b.jpg","Image2"],
|
7 |
+
["photo/c.jpg","Image3"],["photo/d.jpg","Image4"],
|
8 |
+
["photo/e.jpg","Image5"],["photo/f.jpg","Image6"],
|
9 |
+
["photo/g.jpg","Image7"],["photo/h.jpg","Image8"]]
|
10 |
|
11 |
io=gr.Interface(fn=lambda img:model(img).render()[0],inputs=["image"],title="Yolov7 Custom Object Detection",examples=examples,outputs=["image"],).launch()
|
12 |
io.launch()
|