mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-12 12:40:29 +08:00
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:
parent
69e915832a
commit
d8bfa63a38
6
.github/workflows/backend.yml
vendored
6
.github/workflows/backend.yml
vendored
@ -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' }}
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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):
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user