Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,15 @@ from huggingface_hub import hf_hub_download
|
|
10 |
from sf3d.system import SF3D
|
11 |
import sf3d.utils as sf3d_utils
|
12 |
from gradio_litmodel3d import LitModel3D
|
|
|
13 |
|
14 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
15 |
dtype = torch.bfloat16
|
16 |
|
17 |
torch.backends.cuda.matmul.allow_tf32 = True
|
18 |
huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
|
|
|
|
|
19 |
# Set up environment and cache
|
20 |
cache_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "models")
|
21 |
os.environ["TRANSFORMERS_CACHE"] = cache_path
|
|
|
10 |
from sf3d.system import SF3D
|
11 |
import sf3d.utils as sf3d_utils
|
12 |
from gradio_litmodel3d import LitModel3D
|
13 |
+
from huggingface_hub import login
|
14 |
|
15 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
16 |
dtype = torch.bfloat16
|
17 |
|
18 |
torch.backends.cuda.matmul.allow_tf32 = True
|
19 |
huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
|
20 |
+
|
21 |
+
login(token=huggingface_token)
|
22 |
# Set up environment and cache
|
23 |
cache_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "models")
|
24 |
os.environ["TRANSFORMERS_CACHE"] = cache_path
|