Update app.py
Browse files
app.py
CHANGED
@@ -1360,38 +1360,26 @@ with gradio.Blocks() as demo:
|
|
1360 |
|
1361 |
btn1.click(fn=randomize_analysis, inputs=[whence_commeth_geometry], outputs=[radio, length, height, width, diameter, num, geo])
|
1362 |
btn2.click(fn=simple_analysis, inputs=[num, whence_commeth_geometry, radio, length, width, height, diameter], outputs=[pred, true])
|
1363 |
-
with gradio.Tab("Synthesis"):
|
1364 |
-
with gradio.
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
btn1 = gradio.Button("Select")
|
1370 |
-
with gradio.Column():
|
1371 |
-
perf = gradio.Timeseries(x="Frequency", y=['Surge', 'Heave', 'Pitch'], label="Performance")
|
1372 |
-
|
1373 |
-
with gradio.Row():
|
1374 |
-
btn2 = gradio.Button("Synthesize Geometry")
|
1375 |
-
|
1376 |
-
with gradio.Row():
|
1377 |
-
with gradio.Column():
|
1378 |
-
pred = gradio.Plot(label="Predicted")
|
1379 |
-
|
1380 |
-
with gradio.Column():
|
1381 |
-
true = gradio.Plot(label="True")
|
1382 |
-
|
1383 |
-
btn1.click(fn=performance, inputs=[num], outputs=[perf])
|
1384 |
-
btn2.click(fn=simple_synthesis, inputs=[num], outputs=[pred, true])
|
1385 |
-
with gradio.Tab("Spectrum from DataFrame"):
|
1386 |
-
with gradio.Row():
|
1387 |
perf = gradio.Timeseries(x="Frequency", y=['Surge', 'Heave', 'Pitch'], label="Performance")
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1396 |
|
1397 |
demo.launch()
|
|
|
1360 |
|
1361 |
btn1.click(fn=randomize_analysis, inputs=[whence_commeth_geometry], outputs=[radio, length, height, width, diameter, num, geo])
|
1362 |
btn2.click(fn=simple_analysis, inputs=[num, whence_commeth_geometry, radio, length, width, height, diameter], outputs=[pred, true])
|
1363 |
+
with gradio.Tab("Synthesis"):
|
1364 |
+
with gradio.Row():
|
1365 |
+
with gradio.Column():
|
1366 |
+
num = gradio.Number(42, label="Type the index of the shape you would like to use or randomly select it.")
|
1367 |
+
btn1 = gradio.Button("Randomize")
|
1368 |
+
with gradio.Column():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1369 |
perf = gradio.Timeseries(x="Frequency", y=['Surge', 'Heave', 'Pitch'], label="Performance")
|
1370 |
+
|
1371 |
+
with gradio.Row():
|
1372 |
+
btn2 = gradio.Button("Synthesize Geometry")
|
1373 |
+
|
1374 |
+
with gradio.Row():
|
1375 |
+
with gradio.Column():
|
1376 |
+
pred = gradio.Plot(label="Predicted")
|
1377 |
+
|
1378 |
+
with gradio.Column():
|
1379 |
+
true = gradio.Plot(label="True")
|
1380 |
+
|
1381 |
+
btn1.click(fn=lambda: random.randint(1, 4999), inputs=[], outputs=num)
|
1382 |
+
num.chnage(fn=performance, inputs=[num], outputs=[perf])
|
1383 |
+
btn2.click(fn=simple_synthesis, inputs=[num], outputs=[pred, true])
|
1384 |
|
1385 |
demo.launch()
|