Spaces:
Sleeping
Sleeping
megalado
commited on
Commit
·
13284ca
1
Parent(s):
dbc1b3f
Add inner repo path to PYTHONPATH
Browse files
app.py
CHANGED
|
@@ -34,7 +34,11 @@ def generate_motion(prompt: str) -> str:
|
|
| 34 |
# 'utils.*' imports inside the script can be resolved
|
| 35 |
env = os.environ.copy()
|
| 36 |
root = Path(__file__).parent
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
completed = subprocess.run(cmd, env=env, capture_output=True, text=True)
|
| 40 |
if completed.returncode != 0:
|
|
|
|
| 34 |
# 'utils.*' imports inside the script can be resolved
|
| 35 |
env = os.environ.copy()
|
| 36 |
root = Path(__file__).parent
|
| 37 |
+
repo_inner = root / "motion_diffusion_model"
|
| 38 |
+
env["PYTHONPATH"] = (
|
| 39 |
+
f"{env.get('PYTHONPATH', '')}:{root}:{repo_inner}"
|
| 40 |
+
)
|
| 41 |
+
|
| 42 |
|
| 43 |
completed = subprocess.run(cmd, env=env, capture_output=True, text=True)
|
| 44 |
if completed.returncode != 0:
|