jithenderchoudary commited on
Commit
283ebf7
·
verified ·
1 Parent(s): 4c12729

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -2,17 +2,17 @@ import gradio as gr
2
  import sys
3
  import os
4
 
5
- # Add FreeCAD library paths
6
- sys.path.append(r"C:\Program Files\FreeCAD 1.0\bin") # Update with your FreeCAD bin path
7
- sys.path.append(r"C:\Program Files\FreeCAD 1.0\lib") # Update with your FreeCAD lib path
 
8
 
9
  try:
10
- import FreeCAD, Fem, FemGui
11
- from FreeCAD import Gui
12
- print("FreeCAD modules imported successfully.")
13
  except ImportError as e:
14
- print(f"Error importing FreeCAD modules: {e}")
15
- sys.exit(1)
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."""