Sadjad Alikhani commited on
Commit
37527d3
·
verified ·
1 Parent(s): 92aed37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -11
app.py CHANGED
@@ -63,12 +63,6 @@ def process_p_file(uploaded_file, percentage_idx, complexity_idx):
63
  print(f"Cloning model repository from {model_repo_url}...")
64
  subprocess.run(["git", "clone", model_repo_url, model_repo_dir], check=True)
65
 
66
- if os.path.exists(model_repo_dir):
67
- os.chdir(model_repo_dir)
68
- print(f"Changed working directory to {os.getcwd()}")
69
- else:
70
- return f"Directory {model_repo_dir} does not exist."
71
-
72
  # Debugging: Check if the directory exists and print contents
73
  if os.path.exists(model_repo_dir):
74
  os.chdir(model_repo_dir)
@@ -78,12 +72,12 @@ def process_p_file(uploaded_file, percentage_idx, complexity_idx):
78
  print(f"Directory {model_repo_dir} does not exist.")
79
  return
80
 
81
- # Step 2: Add the cloned repo to sys.path for imports
82
- if model_repo_dir not in sys.path:
83
- sys.path.append(model_repo_dir)
84
 
85
- # Debugging: Print sys.path to ensure the cloned repo is in the path
86
- print(f"sys.path: {sys.path}")
87
 
88
  from lwm_model import LWM
89
  device = 'cpu'
 
63
  print(f"Cloning model repository from {model_repo_url}...")
64
  subprocess.run(["git", "clone", model_repo_url, model_repo_dir], check=True)
65
 
 
 
 
 
 
 
66
  # Debugging: Check if the directory exists and print contents
67
  if os.path.exists(model_repo_dir):
68
  os.chdir(model_repo_dir)
 
72
  print(f"Directory {model_repo_dir} does not exist.")
73
  return
74
 
75
+ ## Step 2: Add the cloned repo to sys.path for imports
76
+ #if model_repo_dir not in sys.path:
77
+ # sys.path.append(model_repo_dir)
78
 
79
+ ## Debugging: Print sys.path to ensure the cloned repo is in the path
80
+ #print(f"sys.path: {sys.path}")
81
 
82
  from lwm_model import LWM
83
  device = 'cpu'