Skip to content

Commit 48d302f

Browse files
author
Mishig
authored
Merge pull request #79 from huggingface/doc_build_workflows
add doc-build workflows
2 parents 475ce63 + 4320b96 commit 48d302f

5 files changed

+59
-3
lines changed
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Build documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main
11+
with:
12+
commit_sha: ${{ github.sha }}
13+
package: diffusion-models-class
14+
package_name: diffusion-course
15+
path_to_docs: diffusion-models-class/
16+
additional_args: --not_python_module
17+
convert_notebooks: true
18+
secrets:
19+
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build PR Documentation
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
build:
12+
uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main
13+
with:
14+
commit_sha: ${{ github.event.pull_request.head.sha }}
15+
pr_number: ${{ github.event.number }}
16+
package: diffusion-models-class
17+
package_name: diffusion-course
18+
path_to_docs: diffusion-models-class/
19+
additional_args: --not_python_module
20+
convert_notebooks: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Upload PR Documentation
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Build PR Documentation"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
build:
11+
uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main
12+
with:
13+
package_name: diffusion-course
14+
hub_base_path: https://moon-ci-docs.huggingface.co/learn
15+
secrets:
16+
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
17+
comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }}

_toctree.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
newlocal: unit4/2
4141
title: DDIM Inversion
4242
- local: unit4/02_diffusion_for_audio
43-
newlocal: unit4/1
43+
newlocal: unit4/3
4444
title: Diffusion for Audio
4545

4646
- title: Events related to the course

unit4/02_diffusion_for_audio.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1129,15 +1129,15 @@
11291129
"\n",
11301130
"## Usage\n",
11311131
"\n",
1132-
"```python\n",
1132+
"<pre>\n",
11331133
"from IPython.display import Audio\n",
11341134
"from diffusers import DiffusionPipeline\n",
11351135
"\n",
11361136
"pipe = DiffusionPipeline.from_pretrained(\"{hub_model_id}\")\n",
11371137
"output = pipe()\n",
11381138
"display(output.images[0])\n",
11391139
"display(Audio(output.audios[0], rate=pipe.mel.get_sample_rate()))\n",
1140-
"```\n",
1140+
"</pre>\n",
11411141
"\"\"\"\n",
11421142
"\n",
11431143
"card = ModelCard(content)\n",

0 commit comments

Comments
 (0)