Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def find(name, path):
|
|
18 |
if name in files:
|
19 |
return os.path.join(root, name)
|
20 |
|
21 |
-
model = torch.hub.load('ultralytics/yolov5', 'custom', path='/
|
22 |
def detect(inp):
|
23 |
output=model(inp)
|
24 |
#outPath=
|
@@ -29,7 +29,7 @@ inp=gr.inputs.Image()
|
|
29 |
output=gr.outputs.Image()
|
30 |
|
31 |
|
32 |
-
io=gr.Interface(fn=detect, inputs=inp, outputs=output, title='Party Symbol Detection',examples=['
|
33 |
io.launch(debug=True,share=True)
|
34 |
|
35 |
|
|
|
18 |
if name in files:
|
19 |
return os.path.join(root, name)
|
20 |
|
21 |
+
model = torch.hub.load('ultralytics/yolov5', 'custom', path='/Content/best.pt', force_reload=True)
|
22 |
def detect(inp):
|
23 |
output=model(inp)
|
24 |
#outPath=
|
|
|
29 |
output=gr.outputs.Image()
|
30 |
|
31 |
|
32 |
+
io=gr.Interface(fn=detect, inputs=inp, outputs=output, title='Party Symbol Detection',examples=['Content/4.jpg'])
|
33 |
io.launch(debug=True,share=True)
|
34 |
|
35 |
|