Skip to content

Commit a80084f

Browse files
aliabdabidlabs
andauthored
Dropdown for seeing docs as latest or main (#2544)
* support docs for pip and git * upload spaces with gradio wheel * aws * upload wheel to aws * fix error in docker compose * fix dockerfile * fix dockerfile * fix upload demos * fix upload demos * styling * fake change * remove check_version * fixes * fix buttons * fix navigation on main * add github action * build version docs in docker * fix path and docker errors * add requests * fix command * more docker fixes * more docker fixes * no prerelease * fix restart demos * undo fake changes, and fix build_version * fix variable * fix mistake * add how to build from main * new line to requirements * fix instructions * Update CHANGELOG.md * duplicate line in Dockerfile * switch to github actions, use separate pages * fix issues in github action * fix path for github action * more fixes * more fixes * fix github action * add template * fix demos template * update release notes for 3.9 * add -A * refactor * keep old version htmls * unpin gradio version in requirements * Update website/homepage/src/docs/template.html Co-authored-by: Abubakar Abid <abubakar@huggingface.co> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
1 parent 010827e commit a80084f

21 files changed

Lines changed: 30266 additions & 316 deletions
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will build gradio and create the version's docs file when a new stable version has been released
2+
3+
name: Create Version's Docs
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
types: closed
8+
branches:
9+
- main
10+
paths:
11+
- 'gradio/version.txt'
12+
13+
14+
jobs:
15+
check-version:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Install Python
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: '3.x'
23+
- name: Install requirements
24+
run: python -m pip install -r website/homepage/requirements.txt
25+
- name: Check new pypi version
26+
run: cd website && python check_version.py
27+
build-docs:
28+
needs: check-version
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
- name: Install requirements
33+
run: python -m pip install -r website/homepage/requirements.txt
34+
- name: Install gradio
35+
run: python -m pip install gradio -U
36+
- name: Build Docs
37+
run: cd website/homepage && python build-version-docs.py
38+
- name: Create Pull Request
39+
uses: peter-evans/create-pull-request@v4
40+
with:
41+
add: website/homepage/src/*
42+
author_name: "GH ACTIONS"
43+
author_email: ""
44+
title: "New Version Docs"

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ No changes to highlight.
77
No changes to highlight.
88

99
## Documentation Changes:
10+
* See docs for the latest gradio commit to main as well the latest pip release:
11+
12+
![main-vs-pip](https://user-images.githubusercontent.com/9021060/199607887-aab1ae4e-a070-4527-966d-024397abe15b.gif)
13+
1014
* Modified the "Connecting To a Database Guide" to use `pd.read_sql` as opposed to low-level postgres connector by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 2604](https://github.com/gradio-app/gradio/pull/2604)
1115

1216
## Testing and Infrastructure Changes:
@@ -16,6 +20,7 @@ No changes to highlight.
1620
No changes to highlight.
1721

1822
## Full Changelog:
23+
* Dropdown for seeing docs as latest or main by [@aliabd](https://github.com/aliabd) in [PR 2544](https://github.com/gradio-app/gradio/pull/2544)
1924
* Allow `gr.Templates` to accept parameters to override the defaults by [@abidlabs](https://github.com/abidlabs) in [PR 2600](https://github.com/gradio-app/gradio/pull/2600)
2025
* Components now throw a `ValueError()` if constructed with invalid parameters for `type` or `source` (for components that take those parameters) in [PR 2610](https://github.com/gradio-app/gradio/pull/2610)
2126

demo/depth_estimation/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ torch
22
git+https://github.com/nielsrogge/transformers.git@add_dpt_redesign#egg=transformers
33
numpy
44
Pillow
5-
gradio==3.0b8
65
jinja2
76
open3d
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
torch==1.12.0
22
torchvision==0.13.0
33
torchaudio==0.12.0
4-
gradio==3.1.4
54
librosa==0.9.2
65
gdown

0 commit comments

Comments
 (0)