Update app.py
Browse files
app.py
CHANGED
@@ -7,13 +7,15 @@ from gradio.themes.utils.theme_dropdown import create_theme_dropdown
|
|
7 |
|
8 |
dropdown, js = create_theme_dropdown()
|
9 |
|
10 |
-
|
|
|
|
|
11 |
with gr.Row().style(equal_height=True):
|
12 |
with gr.Column(scale=10):
|
13 |
gr.Markdown(
|
14 |
-
"""
|
15 |
-
# Theme preview: `
|
16 |
-
To use this theme, set `theme='
|
17 |
You can append an `@` and a semantic version expression, e.g. @>=1.0.0,<2.0.0 to pin to a given version
|
18 |
of this theme.
|
19 |
"""
|
@@ -65,7 +67,7 @@ with gr.Blocks(theme='Jameswiller/Globe') as demo:
|
|
65 |
check = gr.Checkbox(label="Go")
|
66 |
with gr.Column(variant="panel", scale=2):
|
67 |
img = gr.Image(
|
68 |
-
"https://huggingface.co/spaces/
|
69 |
).style(height=320)
|
70 |
with gr.Row():
|
71 |
go_btn = gr.Button("Go", label="Primary Button", variant="primary")
|
@@ -75,7 +77,7 @@ with gr.Blocks(theme='Jameswiller/Globe') as demo:
|
|
75 |
|
76 |
def go(*args):
|
77 |
time.sleep(3)
|
78 |
-
return "https://huggingface.co/spaces/
|
79 |
|
80 |
go_btn.click(go, [radio, drop, drop_2, check, name], img, api_name="go")
|
81 |
|
|
|
7 |
|
8 |
dropdown, js = create_theme_dropdown()
|
9 |
|
10 |
+
THEME = 'YTheme/GMaterial'
|
11 |
+
|
12 |
+
with gr.Blocks(theme=THEME) as demo:
|
13 |
with gr.Row().style(equal_height=True):
|
14 |
with gr.Column(scale=10):
|
15 |
gr.Markdown(
|
16 |
+
f"""
|
17 |
+
# Theme preview: `{THEME}`
|
18 |
+
To use this theme, set `theme='{THEME}'` in `gr.Blocks()` or `gr.Interface()`.
|
19 |
You can append an `@` and a semantic version expression, e.g. @>=1.0.0,<2.0.0 to pin to a given version
|
20 |
of this theme.
|
21 |
"""
|
|
|
67 |
check = gr.Checkbox(label="Go")
|
68 |
with gr.Column(variant="panel", scale=2):
|
69 |
img = gr.Image(
|
70 |
+
f"https://huggingface.co/spaces/{THEME}/resolve/main/header-image.jpg", label="Image"
|
71 |
).style(height=320)
|
72 |
with gr.Row():
|
73 |
go_btn = gr.Button("Go", label="Primary Button", variant="primary")
|
|
|
77 |
|
78 |
def go(*args):
|
79 |
time.sleep(3)
|
80 |
+
return f"https://huggingface.co/spaces/{THEME}/resolve/main/header-image.jpg"
|
81 |
|
82 |
go_btn.click(go, [radio, drop, drop_2, check, name], img, api_name="go")
|
83 |
|