Spaces:
Runtime error
Runtime error
ParityError
commited on
Commit
·
b2cb8e3
1
Parent(s):
8757e3c
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import gradio as gr
|
|
7 |
dropdown, js = create_theme_dropdown()
|
8 |
|
9 |
with gr.Blocks(theme='ParityError/Anime') as demo:
|
10 |
-
with gr.Row(equal_height=True):
|
11 |
with gr.Column(scale=10):
|
12 |
gr.Markdown(
|
13 |
"""
|
@@ -20,7 +20,7 @@ with gr.Blocks(theme='ParityError/Anime') as demo:
|
|
20 |
with gr.Column(scale=3):
|
21 |
with gr.Box():
|
22 |
dropdown.render()
|
23 |
-
toggle_dark = gr.Button(value="Toggle Dark")
|
24 |
|
25 |
dropdown.change(None, dropdown, None, _js=js)
|
26 |
toggle_dark.click(
|
@@ -28,7 +28,7 @@ with gr.Blocks(theme='ParityError/Anime') as demo:
|
|
28 |
_js="""
|
29 |
() => {
|
30 |
document.body.classList.toggle('dark');
|
31 |
-
document.querySelector('gradio-app'
|
32 |
}
|
33 |
""",
|
34 |
)
|
@@ -66,7 +66,7 @@ with gr.Blocks(theme='ParityError/Anime') as demo:
|
|
66 |
with gr.Column(variant="panel", scale=2):
|
67 |
img = gr.Image(
|
68 |
"https://gradio-static-files.s3.us-west-2.amazonaws.com/header-image.jpg", label="Image"
|
69 |
-
)
|
70 |
with gr.Row():
|
71 |
go_btn = gr.Button("Go", label="Primary Button", variant="primary")
|
72 |
clear_btn = gr.Button(
|
@@ -88,7 +88,9 @@ with gr.Blocks(theme='ParityError/Anime') as demo:
|
|
88 |
with gr.Row():
|
89 |
btn1 = gr.Button("Button 1", size="sm")
|
90 |
btn2 = gr.UploadButton(size="sm")
|
91 |
-
stop_btn = gr.Button("Stop", label="Stop Button", variant="stop"
|
|
|
|
|
92 |
|
93 |
with gr.Row():
|
94 |
gr.Dataframe(value=[[1, 2, 3], [4, 5, 6], [7, 8, 9]], label="Dataframe")
|
@@ -114,8 +116,8 @@ with gr.Blocks(theme='ParityError/Anime') as demo:
|
|
114 |
"https://gradio-static-files.s3.us-west-2.amazonaws.com/tower.jpg",
|
115 |
"tower",
|
116 |
),
|
117 |
-
]
|
118 |
-
height="200px", grid=2)
|
119 |
|
120 |
with gr.Row():
|
121 |
with gr.Column(scale=2):
|
|
|
7 |
dropdown, js = create_theme_dropdown()
|
8 |
|
9 |
with gr.Blocks(theme='ParityError/Anime') as demo:
|
10 |
+
with gr.Row().style(equal_height=True):
|
11 |
with gr.Column(scale=10):
|
12 |
gr.Markdown(
|
13 |
"""
|
|
|
20 |
with gr.Column(scale=3):
|
21 |
with gr.Box():
|
22 |
dropdown.render()
|
23 |
+
toggle_dark = gr.Button(value="Toggle Dark").style(full_width=True)
|
24 |
|
25 |
dropdown.change(None, dropdown, None, _js=js)
|
26 |
toggle_dark.click(
|
|
|
28 |
_js="""
|
29 |
() => {
|
30 |
document.body.classList.toggle('dark');
|
31 |
+
document.querySelector('gradio-app').style.backgroundColor = 'var(--neutral-700)'
|
32 |
}
|
33 |
""",
|
34 |
)
|
|
|
66 |
with gr.Column(variant="panel", scale=2):
|
67 |
img = gr.Image(
|
68 |
"https://gradio-static-files.s3.us-west-2.amazonaws.com/header-image.jpg", label="Image"
|
69 |
+
).style(height=320)
|
70 |
with gr.Row():
|
71 |
go_btn = gr.Button("Go", label="Primary Button", variant="primary")
|
72 |
clear_btn = gr.Button(
|
|
|
88 |
with gr.Row():
|
89 |
btn1 = gr.Button("Button 1", size="sm")
|
90 |
btn2 = gr.UploadButton(size="sm")
|
91 |
+
stop_btn = gr.Button("Stop", label="Stop Button", variant="stop").style(
|
92 |
+
size="sm"
|
93 |
+
)
|
94 |
|
95 |
with gr.Row():
|
96 |
gr.Dataframe(value=[[1, 2, 3], [4, 5, 6], [7, 8, 9]], label="Dataframe")
|
|
|
116 |
"https://gradio-static-files.s3.us-west-2.amazonaws.com/tower.jpg",
|
117 |
"tower",
|
118 |
),
|
119 |
+
]
|
120 |
+
).style(height="200px", grid=2)
|
121 |
|
122 |
with gr.Row():
|
123 |
with gr.Column(scale=2):
|