From 78507bda2454e57bde85c26cd2a705d899f01ea7 Mon Sep 17 00:00:00 2001 From: Steven Liu <59462357+stevhliu@users.noreply.github.com> Date: Wed, 8 Mar 2023 03:13:19 -0800 Subject: [PATCH] [docs] Build notebooks from Markdown (#2570) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 📝 add mechanism for building colab notebook * 🖍 add notebooks to correct folder * 🖍 fix folder name --- .github/workflows/build_documentation.yml | 1 + docs/source/_config.py | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 docs/source/_config.py diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index fef1fa63..c202cc62 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -13,6 +13,7 @@ jobs: with: commit_sha: ${{ github.sha }} package: diffusers + notebook_folder: diffusers_doc languages: en ko secrets: token: ${{ secrets.HUGGINGFACE_PUSH }} diff --git a/docs/source/_config.py b/docs/source/_config.py new file mode 100644 index 00000000..9a4818ea --- /dev/null +++ b/docs/source/_config.py @@ -0,0 +1,9 @@ +# docstyle-ignore +INSTALL_CONTENT = """ +# Diffusers installation +! pip install diffusers transformers datasets accelerate +# To install from source instead of the last release, comment the command above and uncomment the following one. +# ! pip install git+https://github.com/huggingface/diffusers.git +""" + +notebook_first_cells = [{"type": "code", "content": INSTALL_CONTENT}] \ No newline at end of file