Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,17 +2,17 @@ import gradio as gr
|
|
| 2 |
import sys
|
| 3 |
import os
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
sys.path.append(r"C:\Program Files\FreeCAD 1.0\
|
|
|
|
| 8 |
|
| 9 |
try:
|
| 10 |
-
import FreeCAD
|
| 11 |
-
|
| 12 |
-
print("FreeCAD modules imported successfully.")
|
| 13 |
except ImportError as e:
|
| 14 |
-
print(f"Error importing FreeCAD
|
| 15 |
-
|
| 16 |
|
| 17 |
def run_fea(step_file, output_dir):
|
| 18 |
"""Run FEA using FreeCAD."""
|
|
|
|
| 2 |
import sys
|
| 3 |
import os
|
| 4 |
|
| 5 |
+
|
| 6 |
+
# Update with the correct paths for your system
|
| 7 |
+
sys.path.append(r"C:\Program Files\FreeCAD 1.0\bin") # FreeCAD bin path
|
| 8 |
+
sys.path.append(r"C:\Program Files\FreeCAD 1.0\lib") # FreeCAD lib path
|
| 9 |
|
| 10 |
try:
|
| 11 |
+
import FreeCAD
|
| 12 |
+
print("FreeCAD module imported successfully.")
|
|
|
|
| 13 |
except ImportError as e:
|
| 14 |
+
print(f"Error importing FreeCAD module: {e}")
|
| 15 |
+
|
| 16 |
|
| 17 |
def run_fea(step_file, output_dir):
|
| 18 |
"""Run FEA using FreeCAD."""
|