Spaces:
Runtime error
Runtime error
jongkook90
commited on
Commit
•
fe63e0b
1
Parent(s):
78b3cfa
Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,12 @@ from sahi.utils.cv import visualize_object_predictions, read_image
|
|
6 |
from ultralytics import YOLO
|
7 |
|
8 |
# Images
|
9 |
-
|
10 |
-
torch.hub.download_url_to_file("https://
|
11 |
-
|
|
|
|
|
|
|
12 |
# torch.hub.download_url_to_file('https://user-images.githubusercontent.com/34196005/142742872-1fefcc4d-d7e6-4c43-bbb7-6b5982f7e4ba.jpg', 'highway1.jpg')
|
13 |
# torch.hub.download_url_to_file('https://raw.githubusercontent.com/obss/sahi/main/tests/data/small-vehicles1.jpeg', 'small-vehicles1.jpeg')
|
14 |
|
@@ -99,8 +102,8 @@ title = "Ultralytics YOLOv8: State-of-the-Art YOLO Models"
|
|
99 |
|
100 |
examples = [
|
101 |
['mg.jpg', 'jongkook90/yolov8_comicbook', 640, 0.25, 0.45],
|
102 |
-
['fi.jpg', 'jongkook90/yolov8_comicbook', 640, 0.25, 0.45],
|
103 |
-
['en.jpg', 'jongkook90/yolov8_comicbook', 640, 0.25, 0.45],
|
104 |
]
|
105 |
demo_app = gr.Interface(
|
106 |
fn=yolov8_inference,
|
|
|
6 |
from ultralytics import YOLO
|
7 |
|
8 |
# Images
|
9 |
+
try:
|
10 |
+
torch.hub.download_url_to_file("https://image.jimcdn.com/app/cms/image/transf/none/path/sb7e051baffe289da/image/i98db96643a3b080e/version/1416825261/image.jpg", "mg.jpg")
|
11 |
+
except:
|
12 |
+
torch.hub.download_url_to_file('https://raw.githubusercontent.com/obss/sahi/main/tests/data/small-vehicles1.jpeg', 'mg.jpg')
|
13 |
+
# torch.hub.download_url_to_file("https://ikiwiki.iki.fi/_media/jot-email-1612-fi-iki.png", "fi.jpg")
|
14 |
+
# torch.hub.download_url_to_file("https://www.geekculture.com/joyoftech/joyimages/1612.gif", "en.jpg")
|
15 |
# torch.hub.download_url_to_file('https://user-images.githubusercontent.com/34196005/142742872-1fefcc4d-d7e6-4c43-bbb7-6b5982f7e4ba.jpg', 'highway1.jpg')
|
16 |
# torch.hub.download_url_to_file('https://raw.githubusercontent.com/obss/sahi/main/tests/data/small-vehicles1.jpeg', 'small-vehicles1.jpeg')
|
17 |
|
|
|
102 |
|
103 |
examples = [
|
104 |
['mg.jpg', 'jongkook90/yolov8_comicbook', 640, 0.25, 0.45],
|
105 |
+
#['fi.jpg', 'jongkook90/yolov8_comicbook', 640, 0.25, 0.45],
|
106 |
+
#['en.jpg', 'jongkook90/yolov8_comicbook', 640, 0.25, 0.45],
|
107 |
]
|
108 |
demo_app = gr.Interface(
|
109 |
fn=yolov8_inference,
|