update huggingface hub card template

This commit is contained in:
wa22 2024-06-07 16:22:42 +08:00
parent e161d70ff7
commit ea93d4f379
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,8 @@
card_template_text = """ card_template_text = """
--- ---
license: agpl-3.0 license: agpl-3.0
library_name: ultralytics
repo_url: https://github.com/THU-MIG/yolov10
tags: tags:
- object-detection - object-detection
- computer-vision - computer-vision

View File

@ -7,9 +7,7 @@ from .train import YOLOv10DetectionTrainer
from huggingface_hub import PyTorchModelHubMixin from huggingface_hub import PyTorchModelHubMixin
from .card import card_template_text from .card import card_template_text
class YOLOv10(Model, PyTorchModelHubMixin, library_name="ultralytics", \ class YOLOv10(Model, PyTorchModelHubMixin, model_card_template=card_template_text):
repo_url="https://github.com/THU-MIG/yolov10", \
model_card_template=card_template_text):
def __init__(self, model="yolov10n.pt", task=None, verbose=False, def __init__(self, model="yolov10n.pt", task=None, verbose=False,
names=None): names=None):