Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,41 +22,8 @@ with gr.Blocks() as app:
|
|
| 22 |
inputs=[length, width, thickness],
|
| 23 |
outputs=[die_output, visualization_output],
|
| 24 |
)
|
| 25 |
-
#import gradio as gr
|
| 26 |
-
#from design import generate_die, visualize_die
|
| 27 |
|
| 28 |
-
|
| 29 |
-
#with gr.Blocks() as app:
|
| 30 |
-
# gr.Markdown("## Progressive Die Designer")
|
| 31 |
-
|
| 32 |
-
# User input fields for die dimensions
|
| 33 |
-
#length = gr.Number(label="Length (mm)", value=100)
|
| 34 |
-
#width = gr.Number(label="Width (mm)", value=50)
|
| 35 |
-
#thickness = gr.Number(label="Thickness (mm)", value=10)
|
| 36 |
-
|
| 37 |
-
# Outputs: STEP file location and 3D visualization image
|
| 38 |
-
#die_output = gr.Textbox(label="STEP File Location")
|
| 39 |
-
# visualization_output = gr.Image(label="3D Visualization")
|
| 40 |
-
|
| 41 |
-
# Button to generate die and visualization
|
| 42 |
-
#die_button = gr.Button("Generate Die")
|
| 43 |
-
|
| 44 |
-
# Connect the button to both functions
|
| 45 |
-
#def generate_outputs(l, w, t):
|
| 46 |
-
# step_file = generate_die(l, w, t)
|
| 47 |
-
# visualization_file = visualize_die(l, w, t)
|
| 48 |
-
# return step_file, visualization_file
|
| 49 |
-
|
| 50 |
-
#die_button.click(
|
| 51 |
-
# generate_outputs,
|
| 52 |
-
# inputs=[length, width, thickness],
|
| 53 |
-
# outputs=[die_output, visualization_output],
|
| 54 |
-
# )
|
| 55 |
-
|
| 56 |
-
# Launch the app
|
| 57 |
-
#app.launch()
|
| 58 |
-
|
| 59 |
-
with gr.Tab("Stress Analysis"):
|
| 60 |
gr.Markdown("### Select Simulation Tool and Enter Parameters for Stress Analysis")
|
| 61 |
force = gr.Number(label="Force (N)", value=10000)
|
| 62 |
die_width = gr.Number(label="Width (m)", value=0.05)
|
|
|
|
| 22 |
inputs=[length, width, thickness],
|
| 23 |
outputs=[die_output, visualization_output],
|
| 24 |
)
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
with gr.Tab("Stress Analysis"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
gr.Markdown("### Select Simulation Tool and Enter Parameters for Stress Analysis")
|
| 28 |
force = gr.Number(label="Force (N)", value=10000)
|
| 29 |
die_width = gr.Number(label="Width (m)", value=0.05)
|