Spaces:
Runtime error
Runtime error
Use snapshot_download instead of hf CLI (fixes build)
Browse files
app.py
CHANGED
|
@@ -8,7 +8,6 @@ Usage: python app.py
|
|
| 8 |
"""
|
| 9 |
import base64
|
| 10 |
import os
|
| 11 |
-
import subprocess
|
| 12 |
import tempfile
|
| 13 |
import time
|
| 14 |
from pathlib import Path
|
|
@@ -16,6 +15,7 @@ from uuid import uuid4
|
|
| 16 |
|
| 17 |
import spaces
|
| 18 |
import torch
|
|
|
|
| 19 |
from PIL import Image
|
| 20 |
from fastapi.responses import HTMLResponse, FileResponse, JSONResponse
|
| 21 |
import gradio as gr
|
|
@@ -30,14 +30,7 @@ import example_inputs_b64 as _b64
|
|
| 30 |
# Download checkpoints from HuggingFace Hub (VAST-AI/TripoSplat)
|
| 31 |
# ----------------------------------------------------------------------------
|
| 32 |
|
| 33 |
-
|
| 34 |
-
[
|
| 35 |
-
"hf", "download",
|
| 36 |
-
"VAST-AI/TripoSplat",
|
| 37 |
-
"--local-dir", "ckpts"
|
| 38 |
-
],
|
| 39 |
-
check=True,
|
| 40 |
-
)
|
| 41 |
|
| 42 |
# ----------------------------------------------------------------------------
|
| 43 |
# Pipeline (loaded once at startup)
|
|
|
|
| 8 |
"""
|
| 9 |
import base64
|
| 10 |
import os
|
|
|
|
| 11 |
import tempfile
|
| 12 |
import time
|
| 13 |
from pathlib import Path
|
|
|
|
| 15 |
|
| 16 |
import spaces
|
| 17 |
import torch
|
| 18 |
+
from huggingface_hub import snapshot_download
|
| 19 |
from PIL import Image
|
| 20 |
from fastapi.responses import HTMLResponse, FileResponse, JSONResponse
|
| 21 |
import gradio as gr
|
|
|
|
| 30 |
# Download checkpoints from HuggingFace Hub (VAST-AI/TripoSplat)
|
| 31 |
# ----------------------------------------------------------------------------
|
| 32 |
|
| 33 |
+
snapshot_download(repo_id="VAST-AI/TripoSplat", local_dir="ckpts")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
# ----------------------------------------------------------------------------
|
| 36 |
# Pipeline (loaded once at startup)
|