Spaces:
Running
Running
Sadjad Alikhani
commited on
Update app.py
Browse files
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 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
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:
|