Commit
·
69bfa5d
1
Parent(s):
1e12940
test
Browse files
run.py
CHANGED
@@ -6,13 +6,14 @@ model = torch.hub.load('ultralytics/yolov5', 'custom', path='last2.pt', force_re
|
|
6 |
|
7 |
def detect(im):
|
8 |
results = model(im)
|
9 |
-
return
|
|
|
10 |
#return [im]
|
11 |
|
12 |
demo = gr.Interface(
|
13 |
detect,
|
14 |
[gr.Image(source="webcam", tool=None)],
|
15 |
-
["
|
16 |
)
|
17 |
if __name__ == "__main__":
|
18 |
demo.launch(share=True)
|
|
|
6 |
|
7 |
def detect(im):
|
8 |
results = model(im)
|
9 |
+
return results
|
10 |
+
#return [np.squeeze(results.render())]
|
11 |
#return [im]
|
12 |
|
13 |
demo = gr.Interface(
|
14 |
detect,
|
15 |
[gr.Image(source="webcam", tool=None)],
|
16 |
+
["text"],
|
17 |
)
|
18 |
if __name__ == "__main__":
|
19 |
demo.launch(share=True)
|