Spaces:
Build error
Build error
| from utils.cad_utils import generate_cad_model | |
| from utils.simulation_utils import run_simulation | |
| from utils.gcode_utils import generate_gcode | |
| import gradio as gr | |
| def automate_workflow(dimensions, material, tolerances): | |
| # Step 1: Generate CAD model | |
| cad_file = generate_cad_model(dimensions) | |
| # Step 2: Run simulation | |
| simulation_results = run_simulation(cad_file) | |
| # Step 3: Generate G-Code | |
| gcode_file = generate_gcode(cad_file) | |
| return f"Simulation Results: {simulation_results}", gcode_file | |
| interface = gr.Interface( | |
| fn=automate_workflow, | |
| inputs=[ | |
| gr.Textbox(label="Dimensions (e.g., 100x50x30 mm)"), | |
| gr.Textbox(label="Material (e.g., Steel)"), | |
| gr.Textbox(label="Tolerances (e.g., ±0.05 mm)") | |
| ], | |
| outputs=["text", "file"], | |
| title="End-to-End Automation Workflow" | |
| ) | |
| if __name__ == "__main__": | |
| interface.launch() | |