Update app.py
Browse files
app.py
CHANGED
@@ -230,42 +230,10 @@ with gradio.Blocks() as demo:
|
|
230 |
|
231 |
|
232 |
with gradio.Tab("Analysis"):
|
233 |
-
with gradio.Tab("Geometry from Dataset"):
|
234 |
-
with gradio.Row():
|
235 |
-
with gradio.Column():
|
236 |
-
with gradio.Accordion("Geometry from Parameters", open=True):
|
237 |
-
radio = gradio.Radio(
|
238 |
-
["box", "cone", "cylinder", "sphere", "wedge"], label="What kind of shape would you like to generate?", value="box"
|
239 |
-
)
|
240 |
-
height = gradio.Slider(label="Height", interactive=True, minimum=3.0, maximum=10.0, value=6.5)
|
241 |
-
width = gradio.Slider(label="Width", interactive=True, minimum=3.0, maximum=10.0, value=6.5)
|
242 |
-
diameter = gradio.Slider(label="Diameter", interactive=True, minimum=3.0, maximum=10.0, value=6.5, visible=False)
|
243 |
-
length = gradio.Slider(label="Length", interactive=True, minimum=3.0, maximum=10.0, value=6.5)
|
244 |
-
|
245 |
-
radio.change(fn=change_textbox, inputs=radio, outputs=[height, width, diameter, length])
|
246 |
-
with gradio.Accordion("Geometry from Dataset", open=False):
|
247 |
-
num = gradio.Number(42, label="data index")
|
248 |
-
btn1 = gradio.Button("Select")
|
249 |
-
|
250 |
-
with gradio.Column():
|
251 |
-
geo = gradio.Plot(label="Geometry")
|
252 |
-
|
253 |
-
with gradio.Row():
|
254 |
-
btn2 = gradio.Button("Estimate Spectrum")
|
255 |
-
|
256 |
-
with gradio.Row():
|
257 |
-
with gradio.Column():
|
258 |
-
pred = gradio.Timeseries(x="Frequency", y=['Surge', 'Heave', 'Pitch'], label="Predicted")
|
259 |
-
|
260 |
-
with gradio.Column():
|
261 |
-
true = gradio.Timeseries(x="Frequency", y=['Surge', 'Heave', 'Pitch'], label="True")
|
262 |
-
|
263 |
-
btn1.click(fn=geometry, inputs=[num], outputs=[geo])
|
264 |
-
btn2.click(fn=simple_analysis, inputs=[num], outputs=[pred, true])
|
265 |
|
266 |
-
with gradio.
|
267 |
-
with gradio.
|
268 |
-
with gradio.
|
269 |
radio = gradio.Radio(
|
270 |
["box", "cone", "cylinder", "sphere", "wedge"], label="What kind of shape would you like to generate?", value="box"
|
271 |
)
|
@@ -274,23 +242,26 @@ with gradio.Blocks() as demo:
|
|
274 |
diameter = gradio.Slider(label="Diameter", interactive=True, minimum=3.0, maximum=10.0, value=6.5, visible=False)
|
275 |
length = gradio.Slider(label="Length", interactive=True, minimum=3.0, maximum=10.0, value=6.5)
|
276 |
|
277 |
-
radio.change(fn=change_textbox, inputs=radio, outputs=[height, width, diameter, length])
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
with gradio.
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
|
|
|
|
|
|
294 |
|
295 |
with gradio.Tab("Synthesis"):
|
296 |
with gradio.Tab("Spectrum from Dataset"):
|
|
|
230 |
|
231 |
|
232 |
with gradio.Tab("Analysis"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
|
234 |
+
with gradio.Row():
|
235 |
+
with gradio.Column():
|
236 |
+
with gradio.Accordion("Geometry from Parameters", open=True):
|
237 |
radio = gradio.Radio(
|
238 |
["box", "cone", "cylinder", "sphere", "wedge"], label="What kind of shape would you like to generate?", value="box"
|
239 |
)
|
|
|
242 |
diameter = gradio.Slider(label="Diameter", interactive=True, minimum=3.0, maximum=10.0, value=6.5, visible=False)
|
243 |
length = gradio.Slider(label="Length", interactive=True, minimum=3.0, maximum=10.0, value=6.5)
|
244 |
|
245 |
+
radio.change(fn=change_textbox, inputs=radio, outputs=[height, width, diameter, length])
|
246 |
+
with gradio.Accordion("Geometry from Dataset", open=False):
|
247 |
+
num = gradio.Number(42, label="data index")
|
248 |
+
btn1 = gradio.Button("Select")
|
249 |
+
|
250 |
+
with gradio.Column():
|
251 |
+
geo = gradio.Plot(label="Geometry")
|
252 |
+
|
253 |
+
with gradio.Row():
|
254 |
+
btn2 = gradio.Button("Estimate Spectrum")
|
255 |
+
|
256 |
+
with gradio.Row():
|
257 |
+
with gradio.Column():
|
258 |
+
pred = gradio.Timeseries(x="Frequency", y=['Surge', 'Heave', 'Pitch'], label="Predicted")
|
259 |
+
|
260 |
+
with gradio.Column():
|
261 |
+
true = gradio.Timeseries(x="Frequency", y=['Surge', 'Heave', 'Pitch'], label="True")
|
262 |
+
|
263 |
+
btn1.click(fn=geometry, inputs=[num], outputs=[geo])
|
264 |
+
btn2.click(fn=simple_analysis, inputs=[num], outputs=[pred, true])
|
265 |
|
266 |
with gradio.Tab("Synthesis"):
|
267 |
with gradio.Tab("Spectrum from Dataset"):
|