cgeorgiaw HF Staff commited on
Commit
2c2263f
·
1 Parent(s): 6591f63

reorganizing

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -91,11 +91,10 @@ def gradio_interface() -> gr.Blocks:
91
  rotational_transform = gr.Number(label="Rotational Transform", value=0.4)
92
  n_field_periods = gr.Number(label="Number of Period Fields", value=3)
93
  generate_btn = gr.Button(value="Generate")
94
- boundary_plot = gr.Plot()
95
 
96
- # with gr.Column(visible=True):
97
-
98
- interactive_plot = gr.Plot()
99
  # boozer_plot = gr.Plot()
100
  # flux_surface_plot = gr.Plot()
101
 
@@ -119,8 +118,8 @@ def gradio_interface() -> gr.Blocks:
119
 
120
  # dropdown.change(get_boundary_from_leaderboard, dropdown, [boundary_plot, interactive_plot, boozer_plot, flux_surface_plot])
121
  rld_btn.click(get_boundary_from_leaderboard, dropdown, boundary) \
122
- .then(make_boundary_plot, boundary, boundary_plot) \
123
  .then(make_interactive_plot, boundary, interactive_plot) \
 
124
  # .then(make_boozer_plot, boundary, boozer_plot) \
125
  # .then(make_flux_surface_plot, boundary, flux_surface_plot)
126
 
@@ -134,8 +133,8 @@ def gradio_interface() -> gr.Blocks:
134
  return boundary
135
 
136
  upload_box.change(get_boundary_vis_from_upload, inputs=[upload_box], outputs=boundary) \
137
- .then(make_boundary_plot, boundary, boundary_plot) \
138
  .then(make_interactive_plot, boundary, interactive_plot) \
 
139
  # .then(make_boozer_plot, boundary, boozer_plot) \
140
  # .then(make_flux_surface_plot, boundary, flux_surface_plot)
141
 
@@ -146,8 +145,8 @@ def gradio_interface() -> gr.Blocks:
146
  return boundary
147
 
148
  generate_btn.click(generate_random_boundary, [aspect_ratio, elongation, rotational_transform, n_field_periods], boundary) \
149
- .then(make_boundary_plot, boundary, boundary_plot) \
150
  .then(make_interactive_plot, boundary, interactive_plot) \
 
151
  # .then(make_boozer_plot, boundary, boozer_plot) \
152
  # .then(make_flux_surface_plot, boundary, flux_surface_plot)
153
 
 
91
  rotational_transform = gr.Number(label="Rotational Transform", value=0.4)
92
  n_field_periods = gr.Number(label="Number of Period Fields", value=3)
93
  generate_btn = gr.Button(value="Generate")
 
94
 
95
+ with gr.Column(visible=True):
96
+ interactive_plot = gr.Plot()
97
+ boundary_plot = gr.Plot()
98
  # boozer_plot = gr.Plot()
99
  # flux_surface_plot = gr.Plot()
100
 
 
118
 
119
  # dropdown.change(get_boundary_from_leaderboard, dropdown, [boundary_plot, interactive_plot, boozer_plot, flux_surface_plot])
120
  rld_btn.click(get_boundary_from_leaderboard, dropdown, boundary) \
 
121
  .then(make_interactive_plot, boundary, interactive_plot) \
122
+ .then(make_boundary_plot, boundary, boundary_plot) \
123
  # .then(make_boozer_plot, boundary, boozer_plot) \
124
  # .then(make_flux_surface_plot, boundary, flux_surface_plot)
125
 
 
133
  return boundary
134
 
135
  upload_box.change(get_boundary_vis_from_upload, inputs=[upload_box], outputs=boundary) \
 
136
  .then(make_interactive_plot, boundary, interactive_plot) \
137
+ .then(make_boundary_plot, boundary, boundary_plot) \
138
  # .then(make_boozer_plot, boundary, boozer_plot) \
139
  # .then(make_flux_surface_plot, boundary, flux_surface_plot)
140
 
 
145
  return boundary
146
 
147
  generate_btn.click(generate_random_boundary, [aspect_ratio, elongation, rotational_transform, n_field_periods], boundary) \
 
148
  .then(make_interactive_plot, boundary, interactive_plot) \
149
+ .then(make_boundary_plot, boundary, boundary_plot) \
150
  # .then(make_boozer_plot, boundary, boozer_plot) \
151
  # .then(make_flux_surface_plot, boundary, flux_surface_plot)
152