ParityError commited on
Commit
99ee098
·
1 Parent(s): 7363556

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
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().style(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").style(full_width=True)
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').style.backgroundColor = 'var(--neutral-700)'
32
  }
33
  """,
34
  )
@@ -65,8 +65,8 @@ with gr.Blocks(theme='ParityError/Anime') as demo:
65
  check = gr.Checkbox(label="Go")
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(
@@ -86,10 +86,9 @@ with gr.Blocks(theme='ParityError/Anime') as demo:
86
  clear_btn.click(clear, None, img)
87
 
88
  with gr.Row():
89
- btn1 = gr.Button("Button 1").style(size="sm")
90
- btn2 = gr.UploadButton().style(size="sm")
91
- stop_btn = gr.Button("Stop", label="Stop Button", variant="stop").style(
92
- size="sm"
93
  )
94
 
95
  with gr.Row():
@@ -117,7 +116,7 @@ with gr.Blocks(theme='ParityError/Anime') as demo:
117
  "tower",
118
  ),
119
  ]
120
- ).style(height="200px", grid=2)
121
 
122
  with gr.Row():
123
  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(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", 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', backgroundColor = 'var(--neutral-700)')
32
  }
33
  """,
34
  )
 
65
  check = gr.Checkbox(label="Go")
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", height=320
69
+ )
70
  with gr.Row():
71
  go_btn = gr.Button("Go", label="Primary Button", variant="primary")
72
  clear_btn = gr.Button(
 
86
  clear_btn.click(clear, None, img)
87
 
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", size="sm")
 
92
  )
93
 
94
  with gr.Row():
 
116
  "tower",
117
  ),
118
  ]
119
+ height="200px", grid=2)
120
 
121
  with gr.Row():
122
  with gr.Column(scale=2):