Sadjad Alikhani commited on
Commit
8aef216
·
verified ·
1 Parent(s): c7b6b77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -87,13 +87,13 @@ def process_p_file(uploaded_file, percentage_idx, complexity_idx):
87
  subprocess.run(["git", "clone", model_repo_url, model_repo_dir], check=True)
88
 
89
  ## Debugging: Check if the directory exists and print contents
90
- #if os.path.exists(model_repo_dir):
91
- # os.chdir(model_repo_dir)
92
- # print(f"Changed working directory to {os.getcwd()}")
93
- # print(f"Directory content: {os.listdir(os.getcwd())}") # Debugging: Check repo content
94
- #else:
95
- # print(f"Directory {model_repo_dir} does not exist.")
96
- # return
97
 
98
  ## Step 2: Add the cloned repo to sys.path for imports
99
  #if model_repo_dir not in sys.path:
 
87
  subprocess.run(["git", "clone", model_repo_url, model_repo_dir], check=True)
88
 
89
  ## Debugging: Check if the directory exists and print contents
90
+ if os.path.exists(model_repo_dir):
91
+ os.chdir(model_repo_dir)
92
+ print(f"Changed working directory to {os.getcwd()}")
93
+ print(f"Directory content: {os.listdir(os.getcwd())}") # Debugging: Check repo content
94
+ else:
95
+ print(f"Directory {model_repo_dir} does not exist.")
96
+ return
97
 
98
  ## Step 2: Add the cloned repo to sys.path for imports
99
  #if model_repo_dir not in sys.path: