Fix the expired image link used in theme builder (#4944)

* fix the expired image link

* update CHANGELOG.md

* Update gradio/themes/app.py

change the image link same as the original one

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Update gradio/themes/app.py

change the image link same as the original one

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* apply lint

* equalize the default image link with app.py

* equalize default image links in building theme

* equalize default image links in demo notebook

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
Hyoung-Kyu Song 2023-07-18 00:51:01 +09:00 committed by GitHub
parent 6d40cdc7c5
commit e6cf145fc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 7 deletions

View File

@ -10,6 +10,7 @@
* The `.change()` event is fixed in `Audio` so that fires when the component value is programmatically updated by [@abidlabs](https://github.com/abidlabs) in [PR 4793](https://github.com/gradio-app/gradio/pull/4793)
- Fixed bug where `gr.Video` could not preprocess urls by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4904](https://github.com/gradio-app/gradio/pull/4904)
- Fixed copy button rendering in API page on Safari by [@aliabid94](https://github.com/aliabid94) in [PR 4924](https://github.com/gradio-app/gradio/pull/4924)
- Fixed broken image link in auto-generated `app.py` from `ThemeClass.push_to_hub` by [@deepkyu](https://github.com/deepkyu) in [PR 4944](https://github.com/gradio-app/gradio/pull/4944)
## Other Changes:

File diff suppressed because one or more lines are too long

View File

@ -112,7 +112,8 @@ with gr.Blocks(theme=base_theme) as demo:
check = gr.Checkbox(label="Go")
with gr.Column(variant="panel", scale=2):
img = gr.Image(
"https://gradio.app/assets/img/header-image.jpg", label="Image"
"https://raw.githubusercontent.com/gradio-app/gradio/main/js/_website/src/assets/img/header-image.jpg",
label="Image"
).style(height=320)
with gr.Row():
go_btn = gr.Button("Go", label="Primary Button", variant="primary")
@ -122,7 +123,7 @@ with gr.Blocks(theme=base_theme) as demo:
def go(*args):
time.sleep(3)
return "https://i.ibb.co/6BgKdSj/groot.jpg"
return "https://raw.githubusercontent.com/gradio-app/gradio/main/js/_website/src/assets/img/header-image.jpg"
go_btn.click(go, [radio, drop, drop_2, check, name], img, api_name="go")

View File

@ -63,7 +63,8 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
check = gr.Checkbox(label="Go")
with gr.Column(variant="panel", scale=2):
img = gr.Image(
"https://gradio.app/assets/img/header-image.jpg", label="Image"
"https://raw.githubusercontent.com/gradio-app/gradio/main/js/_website/src/assets/img/header-image.jpg",
label="Image",
).style(height=320)
with gr.Row():
go_btn = gr.Button("Go", label="Primary Button", variant="primary")
@ -73,7 +74,7 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
def go(*args):
time.sleep(3)
return "https://gradio.app/assets/img/header-image.jpg"
return "https://raw.githubusercontent.com/gradio-app/gradio/main/js/_website/src/assets/img/header-image.jpg"
go_btn.click(go, [radio, drop, drop_2, check, name], img, api_name="go")

View File

@ -351,7 +351,9 @@ with gr.Blocks( # noqa: SIM117
check = gr.Checkbox(label="Go")
with gr.Column(variant="panel", scale=2):
img = gr.Image(
"https://i.ibb.co/6BgKdSj/groot.jpg", label="Image", height=320
"https://raw.githubusercontent.com/gradio-app/gradio/main/js/_website/src/assets/img/header-image.jpg",
label="Image",
height=320,
)
with gr.Row():
go_btn = gr.Button(
@ -363,7 +365,7 @@ with gr.Blocks( # noqa: SIM117
def go(*args):
time.sleep(3)
return "https://i.ibb.co/6BgKdSj/groot.jpg"
return "https://raw.githubusercontent.com/gradio-app/gradio/main/js/_website/src/assets/img/header-image.jpg"
go_btn.click(
go,