rbanfield commited on
Commit
e55d3ba
1 Parent(s): 7d7cc4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -13
app.py CHANGED
@@ -7,7 +7,10 @@ import gradio as gr
7
  dropdown, js = create_theme_dropdown()
8
 
9
  with gr.Blocks(theme='trimble/trimble_ai_theme') as demo:
10
- with gr.Row().style(equal_height=True):
 
 
 
11
  with gr.Column(scale=10):
12
  gr.Markdown(
13
  """
@@ -20,7 +23,7 @@ with gr.Blocks(theme='trimble/trimble_ai_theme') 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(
@@ -65,8 +68,9 @@ with gr.Blocks(theme='trimble/trimble_ai_theme') as demo:
65
  check = gr.Checkbox(label="Go")
66
  with gr.Column(variant="panel", scale=2):
67
  img = gr.Image(
68
- "https://gradio.app/assets/img/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(
@@ -75,7 +79,7 @@ with gr.Blocks(theme='trimble/trimble_ai_theme') as demo:
75
 
76
  def go(*args):
77
  time.sleep(3)
78
- return "https://gradio.app/assets/img/header-image.jpg"
79
 
80
  go_btn.click(go, [radio, drop, drop_2, check, name], img, api_name="go")
81
 
@@ -86,11 +90,9 @@ with gr.Blocks(theme='trimble/trimble_ai_theme') 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():
96
  gr.Dataframe(value=[[1, 2, 3], [4, 5, 6], [7, 8, 9]], label="Dataframe")
@@ -116,8 +118,8 @@ with gr.Blocks(theme='trimble/trimble_ai_theme') as demo:
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):
@@ -144,4 +146,4 @@ with gr.Blocks(theme='trimble/trimble_ai_theme') as demo:
144
 
145
 
146
  if __name__ == "__main__":
147
- demo.queue().launch()
 
7
  dropdown, js = create_theme_dropdown()
8
 
9
  with gr.Blocks(theme='trimble/trimble_ai_theme') as demo:
10
+
11
+ gr.HTML("<img src=\"https://huggingface.co/spaces/trimble/trimble_ai_theme/resolve/main/images/logo.png\">")
12
+
13
+ with gr.Row(equal_height=True):
14
  with gr.Column(scale=10):
15
  gr.Markdown(
16
  """
 
23
  with gr.Column(scale=3):
24
  with gr.Box():
25
  dropdown.render()
26
+ toggle_dark = gr.Button(value="Toggle Dark")
27
 
28
  dropdown.change(None, dropdown, None, _js=js)
29
  toggle_dark.click(
 
68
  check = gr.Checkbox(label="Go")
69
  with gr.Column(variant="panel", scale=2):
70
  img = gr.Image(
71
+ "https://www.gradio.app/_app/immutable/assets/gradio.8a5e8876.svg", label="Image", height=320
72
+ )
73
+
74
  with gr.Row():
75
  go_btn = gr.Button("Go", label="Primary Button", variant="primary")
76
  clear_btn = gr.Button(
 
79
 
80
  def go(*args):
81
  time.sleep(3)
82
+ return "https://www.gradio.app/_app/immutable/assets/gradio.8a5e8876.svg"
83
 
84
  go_btn.click(go, [radio, drop, drop_2, check, name], img, api_name="go")
85
 
 
90
  clear_btn.click(clear, None, img)
91
 
92
  with gr.Row():
93
+ btn1 = gr.Button("Button 1", size="sm")
94
+ btn2 = gr.UploadButton(size="sm")
95
+ stop_btn = gr.Button("Stop", label="Stop Button", variant="stop", size="sm")
 
 
96
 
97
  with gr.Row():
98
  gr.Dataframe(value=[[1, 2, 3], [4, 5, 6], [7, 8, 9]], label="Dataframe")
 
118
  "https://gradio-static-files.s3.us-west-2.amazonaws.com/tower.jpg",
119
  "tower",
120
  ),
121
+ ], height="200px"
122
+ )
123
 
124
  with gr.Row():
125
  with gr.Column(scale=2):
 
146
 
147
 
148
  if __name__ == "__main__":
149
+ demo.queue().launch()