theme builder example doesn't work for 3.25.0 or later (#3869)

* theme builder example doesn't work for `3.25.0` or later
Fixes #3864

* update CHANGELOG.md

* Fix import order

* Lint

* added test

* add wheel

* wheel

* wheels

* pip

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
Hyoung-Kyu Song 2023-04-16 19:22:45 +09:00 committed by GitHub
parent 69e915832a
commit d8bfa63a38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 10 deletions

View File

@ -36,7 +36,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install pip
run: python -m pip install build requests virtualenv
run: python -m pip install build requests virtualenv wheel
- name: venv activate Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
@ -87,7 +87,7 @@ jobs:
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install pip
run: python -m pip install build requests virtualenv
run: python -m pip install build requests virtualenv wheel
- name: venv activate Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
@ -104,7 +104,7 @@ jobs:
shell: bash
run: |
bash scripts/install_gradio.sh
pip install --upgrade pip
python -m pip install --upgrade pip
- name: Install 3.9 Test Dependencies
shell: bash
if: ${{ matrix.python-version == '3.9' }}

View File

@ -24,6 +24,7 @@ No changes to highlight.
## Full Changelog:
- Add DESCRIPTION.md to image_segmentation demo by [@aliabd](https://github.com/aliabd) in [PR 3866](https://github.com/gradio-app/gradio/pull/3866)
- Fix error in running `gr.themes.builder()` by [@deepkyu](https://github.com/deepkyu) in [PR 3869](https://github.com/gradio-app/gradio/pull/3869)
## Contributors Shoutout:

View File

@ -10,6 +10,8 @@ from gradio.blocks import Blocks
from gradio.components import (
HTML,
JSON,
AnnotatedImage,
Annotatedimage,
Audio,
BarPlot,
Button,
@ -30,8 +32,6 @@ from gradio.components import (
HighlightedText,
Highlightedtext,
Image,
AnnotatedImage,
Annotatedimage,
Interpretation,
Json,
Label,

View File

@ -13,4 +13,4 @@ from gradio.themes.utils.sizes import Size # noqa: F401
def builder(*args, **kwargs):
from gradio.themes.builder import demo
demo.launch(*args, **kwargs)
return demo.launch(*args, **kwargs)

View File

@ -2,6 +2,8 @@ import inspect
import time
from typing import Iterable
from gradio_client.documentation import document_fn
import gradio as gr
themes = [
@ -16,10 +18,8 @@ sizes = gr.themes.Size.all
palette_range = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]
size_range = ["xxs", "xs", "sm", "md", "lg", "xl", "xxl"]
docs_theme_core = gr.documentation.document_fn(gr.themes.Base.__init__, gr.themes.Base)[
1
]
docs_theme_vars = gr.documentation.document_fn(gr.themes.Base.set, gr.themes.Base)[1]
docs_theme_core = document_fn(gr.themes.Base.__init__, gr.themes.Base)[1]
docs_theme_vars = document_fn(gr.themes.Base.set, gr.themes.Base)[1]
def get_docstr(var):

View File

@ -414,3 +414,8 @@ class TestThemeUploadDownload:
exist_ok=True,
private=True,
)
def test_theme_builder_launches():
gr.themes.builder(prevent_thread_lock=True)
gr.close_all()