Spaces:
Runtime error
Runtime error
feat: update description
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ gdown.download(url, output, quiet=False)
|
|
12 |
'''
|
13 |
|
14 |
# Images
|
15 |
-
torch.hub.download_url_to_file('https://
|
16 |
-
torch.hub.download_url_to_file('https://
|
17 |
|
18 |
# Model
|
19 |
# model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # force_reload=True to update
|
@@ -31,9 +31,9 @@ def yolo(im, size=640):
|
|
31 |
inputs = gr.inputs.Image(type='pil', label="Original Image")
|
32 |
outputs = gr.outputs.Image(type="pil", label="Output Image")
|
33 |
|
34 |
-
title = "YOLOv5"
|
35 |
-
description = "YOLOv5 Gradio demo for object detection. Upload an image or click an example image to use."
|
36 |
-
article = "<p style='text-align: center'>YOLOv5 is a family of compound-scaled object detection models trained on the
|
37 |
|
38 |
-
examples = [['
|
39 |
gr.Interface(yolo, inputs, outputs, title=title, description=description, article=article, examples=examples, theme="huggingface").launch(enable_queue=True) # cache_examples=True,
|
|
|
12 |
'''
|
13 |
|
14 |
# Images
|
15 |
+
torch.hub.download_url_to_file('https://www.dl.ndl.go.jp/api/iiif/2586696/R0000009/full/1024,/0/default.jpg', '2586696_R0000009.jpg')
|
16 |
+
torch.hub.download_url_to_file('https://www.dl.ndl.go.jp/api/iiif/2586696/R0000010/full/1024,/0/default.jpg', '2586696_R0000010.jpg')
|
17 |
|
18 |
# Model
|
19 |
# model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # force_reload=True to update
|
|
|
31 |
inputs = gr.inputs.Image(type='pil', label="Original Image")
|
32 |
outputs = gr.outputs.Image(type="pil", label="Output Image")
|
33 |
|
34 |
+
title = "YOLOv5 Kunshujo"
|
35 |
+
description = "YOLOv5 Kunshujo Gradio demo for object detection. Upload an image or click an example image to use."
|
36 |
+
article = "<p style='text-align: center'>YOLOv5 is a family of compound-scaled object detection models trained on the Kunshujo layout dataset, and includes simple functionality for Test Time Augmentation (TTA), model ensembling, hyperparameter evolution, and export to ONNX, CoreML and TFLite. <a href='https://github.com/ultralytics/yolov5'>Source code</a> | <a href='https://pytorch.org/hub/ultralytics_yolov5'>PyTorch Hub</a></p>"
|
37 |
|
38 |
+
examples = [['2586696_R0000009.jpg'], ['2586696_R0000010.jpg']]
|
39 |
gr.Interface(yolo, inputs, outputs, title=title, description=description, article=article, examples=examples, theme="huggingface").launch(enable_queue=True) # cache_examples=True,
|