Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -422,13 +422,6 @@ with gr.Blocks(theme=gr.themes.Soft(), title="CAD-Wizard") as demo:
|
|
| 422 |
cad_2d_button = gr.Button("Generate 2D Views", variant="primary")
|
| 423 |
with gr.Column(scale=2):
|
| 424 |
cad_2d_output = gr.Image(label="Orthographic Views with Dimensions")
|
| 425 |
-
gr.Examples(
|
| 426 |
-
[["examples/bracket.stl"], ["examples/gear.stl"]],
|
| 427 |
-
inputs=cad_file_input,
|
| 428 |
-
outputs=cad_2d_output,
|
| 429 |
-
fn=generate_ortho_views,
|
| 430 |
-
cache_examples=True
|
| 431 |
-
)
|
| 432 |
|
| 433 |
# --- TAB 2: 2D CFD Simulator ---
|
| 434 |
with gr.TabItem("2D CFD Simulator", id=1):
|
|
@@ -506,10 +499,4 @@ with gr.Blocks(theme=gr.themes.Soft(), title="CAD-Wizard") as demo:
|
|
| 506 |
|
| 507 |
|
| 508 |
if __name__ == "__main__":
|
| 509 |
-
# Create some example files for the first tab
|
| 510 |
-
if not os.path.exists("examples"):
|
| 511 |
-
os.makedirs("examples")
|
| 512 |
-
trimesh.creation.box(extents=[50,30,40]).export("examples/bracket.stl")
|
| 513 |
-
trimesh.creation.gear(tooth_number=12, radial_pitch=20).export("examples/gear.stl")
|
| 514 |
-
|
| 515 |
demo.launch()
|
|
|
|
| 422 |
cad_2d_button = gr.Button("Generate 2D Views", variant="primary")
|
| 423 |
with gr.Column(scale=2):
|
| 424 |
cad_2d_output = gr.Image(label="Orthographic Views with Dimensions")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 425 |
|
| 426 |
# --- TAB 2: 2D CFD Simulator ---
|
| 427 |
with gr.TabItem("2D CFD Simulator", id=1):
|
|
|
|
| 499 |
|
| 500 |
|
| 501 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 502 |
demo.launch()
|