MilesCranmer commited on
Commit
e4dfed6
1 Parent(s): b955f86

refactor(gui): put buttons in same row

Browse files
Files changed (1) hide show
  1. gui/app.py +9 -6
gui/app.py CHANGED
@@ -10,9 +10,9 @@ from processing import processing, stop
10
 
11
  class ExampleData:
12
  def __init__(self, demo: gr.Blocks) -> None:
13
- with gr.Column():
14
  self.example_plot = gr.Plot()
15
- with gr.Column():
16
  self.test_equation = gr.Radio(
17
  TEST_EQUATIONS, value=TEST_EQUATIONS[0], label="Test Equation"
18
  )
@@ -231,15 +231,18 @@ def flatten_attributes(
231
  class AppInterface:
232
  def __init__(self, demo: gr.Blocks) -> None:
233
  with gr.Row():
234
- with gr.Column():
235
  with gr.Row():
236
  self.data = Data(demo)
237
  with gr.Row():
238
  self.settings = Settings()
239
- with gr.Column():
240
  self.results = Results()
241
- self.run = gr.Button()
242
- self.stop = gr.Button(value="Stop")
 
 
 
243
 
244
  # Update plot when dataframe is updated:
245
  self.results.df.change(
 
10
 
11
  class ExampleData:
12
  def __init__(self, demo: gr.Blocks) -> None:
13
+ with gr.Column(scale=1):
14
  self.example_plot = gr.Plot()
15
+ with gr.Column(scale=1):
16
  self.test_equation = gr.Radio(
17
  TEST_EQUATIONS, value=TEST_EQUATIONS[0], label="Test Equation"
18
  )
 
231
  class AppInterface:
232
  def __init__(self, demo: gr.Blocks) -> None:
233
  with gr.Row():
234
+ with gr.Column(scale=2):
235
  with gr.Row():
236
  self.data = Data(demo)
237
  with gr.Row():
238
  self.settings = Settings()
239
+ with gr.Column(scale=2):
240
  self.results = Results()
241
+ with gr.Row():
242
+ with gr.Column(scale=1):
243
+ self.stop = gr.Button(value="Stop")
244
+ with gr.Column(scale=1, min_width=200):
245
+ self.run = gr.Button()
246
 
247
  # Update plot when dataframe is updated:
248
  self.results.df.change(