Skip to content

Commit 51965ff

Browse files
kefranabgpcuenca
andauthored
Improve Gallery component documentation (#1507)
* Improve Gallery component documentation Add video support mention * Update docs/hub/model-cards-components.md Co-authored-by: Pedro Cuenca <[email protected]> --------- Co-authored-by: Pedro Cuenca <[email protected]>
1 parent 258f925 commit 51965ff

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

docs/hub/model-cards-components.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,11 @@
44

55
## The Gallery component
66

7-
Add the `<Gallery />` component to your text-to-image model card to showcase your images generation.
7+
The `<Gallery />` component can be used in your model card to showcase your generated images and videos.
88

9-
For example,
10-
```md
11-
12-
<Gallery />
13-
14-
## Model description
15-
16-
TintinIA is fine-tuned version of Stable-Diffusion-xl trained on 125 comics panels from Tintin album.
17-
18-
```
19-
20-
21-
<div class="flex justify-center">
22-
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/models-gallery.png"/>
23-
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/models-gallery-dark.png"/>
24-
</div>
9+
### How to use it?
2510

26-
The `<Gallery/>` component will use your Model Card [widget metadata](/docs/hub/models-widgets-examples#text-to-image) to display the images with each associated prompt.
11+
1. Update your Model Card [widget metadata](/docs/hub/models-widgets-examples#text-to-image) to add the media you want to showcase.
2712

2813
```yaml
2914
widget:
@@ -40,4 +25,20 @@ widget:
4025
url: "images/office.png"
4126
```
4227
28+
2. Add the `<Gallery />` component to your card. The widget metadata will be used by the `<Gallery />` component to display the media with each associated prompt.
29+
```md
30+
31+
<Gallery />
32+
33+
## Model description
34+
35+
TintinIA is fine-tuned version of Stable-Diffusion-xl trained on 125 comics panels from Tintin album.
36+
37+
```
38+
39+
<div class="flex justify-center">
40+
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/models-gallery.png"/>
41+
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/models-gallery-dark.png"/>
42+
</div>
43+
4344
> Hint: Support of Card Components through the GUI editor coming soon...

0 commit comments

Comments
 (0)