Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the expired image link used in theme builder #4944

Merged
merged 8 commits into from Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion demo/blocks_kitchen_sink/run.ipynb

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions demo/blocks_kitchen_sink/run.py
Expand Up @@ -112,7 +112,8 @@
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")
Expand All @@ -122,7 +123,7 @@

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")

Expand Down
5 changes: 3 additions & 2 deletions gradio/themes/app.py
Expand Up @@ -63,7 +63,8 @@
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")
Expand All @@ -73,7 +74,7 @@

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")

Expand Down
6 changes: 4 additions & 2 deletions gradio/themes/builder_app.py
Expand Up @@ -351,7 +351,9 @@ def get_doc_theme_var_groups():
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(
Expand All @@ -363,7 +365,7 @@ def get_doc_theme_var_groups():

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,
Expand Down