You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/huggingface_hub/hub_mixin.py
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,8 @@ class DataclassInstance(Protocol):
58
58
---
59
59
60
60
This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
61
-
- Library: {{ repo_url | default("[More Information Needed]", true) }}
61
+
- Code: {{ repo_url | default("[More Information Needed]", true) }}
62
+
- Paper: {{ paper_url | default("[More Information Needed]", true) }}
62
63
- Docs: {{ docs_url | default("[More Information Needed]", true) }}
63
64
"""
64
65
@@ -67,8 +68,9 @@ class DataclassInstance(Protocol):
67
68
classMixinInfo:
68
69
model_card_template: str
69
70
model_card_data: ModelCardData
70
-
repo_url: Optional[str] =None
71
71
docs_url: Optional[str] =None
72
+
paper_url: Optional[str] =None
73
+
repo_url: Optional[str] =None
72
74
73
75
74
76
classModelHubMixin:
@@ -88,6 +90,8 @@ class ModelHubMixin:
88
90
Args:
89
91
repo_url (`str`, *optional*):
90
92
URL of the library repository. Used to generate model card.
93
+
paper_url (`str`, *optional*):
94
+
URL of the library paper. Used to generate model card.
91
95
docs_url (`str`, *optional*):
92
96
URL of the library documentation. Used to generate model card.
93
97
model_card_template (`str`, *optional*):
@@ -110,7 +114,7 @@ class ModelHubMixin:
110
114
pipeline_tag (`str`, *optional*):
111
115
Tag of the pipeline. Used to generate model card. E.g. "text-classification".
112
116
tags (`List[str]`, *optional*):
113
-
Tags to be added to the model card. Used to generate model card. E.g. ["x-custom-tag", "arxiv:2304.12244"]
117
+
Tags to be added to the model card. Used to generate model card. E.g. ["computer-vision"]
0 commit comments