Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,8 +16,8 @@ if HF_TOKEN is None:
|
|
| 16 |
if not os.path.exists(CODE_DIR):
|
| 17 |
repo_url = f"https://{HF_TOKEN}@github.com/{GITHUB_USERNAME}/{GITHUB_REPO}.git"
|
| 18 |
subprocess.run([
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
# Final path to FastAPI entry point
|
| 23 |
api_script = os.path.join(CODE_DIR, "app.py")
|
|
|
|
| 16 |
if not os.path.exists(CODE_DIR):
|
| 17 |
repo_url = f"https://{HF_TOKEN}@github.com/{GITHUB_USERNAME}/{GITHUB_REPO}.git"
|
| 18 |
subprocess.run([
|
| 19 |
+
"git", "clone", "--depth", "1", "--branch", GITHUB_BRANCH, repo_url, CODE_DIR
|
| 20 |
+
], check=True, stdout=sys.stdout, stderr=sys.stderr)
|
| 21 |
|
| 22 |
# Final path to FastAPI entry point
|
| 23 |
api_script = os.path.join(CODE_DIR, "app.py")
|