amaye15
commited on
Commit
•
071dd3c
1
Parent(s):
78d359b
token added
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from sam2.sam2_image_predictor import SAM2ImagePredictor
|
|
6 |
from PIL import Image
|
7 |
from uuid import uuid4
|
8 |
import os
|
9 |
-
from huggingface_hub import upload_folder
|
10 |
import shutil
|
11 |
|
12 |
MODEL = "facebook/sam2-hiera-large"
|
@@ -14,6 +14,8 @@ DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
14 |
PREDICTOR = SAM2ImagePredictor.from_pretrained(MODEL, device=DEVICE)
|
15 |
|
16 |
|
|
|
|
|
17 |
GLOBALS = {}
|
18 |
|
19 |
|
|
|
6 |
from PIL import Image
|
7 |
from uuid import uuid4
|
8 |
import os
|
9 |
+
from huggingface_hub import upload_folder, login
|
10 |
import shutil
|
11 |
|
12 |
MODEL = "facebook/sam2-hiera-large"
|
|
|
14 |
PREDICTOR = SAM2ImagePredictor.from_pretrained(MODEL, device=DEVICE)
|
15 |
|
16 |
|
17 |
+
login(os.getenv("TOKEN"))
|
18 |
+
|
19 |
GLOBALS = {}
|
20 |
|
21 |
|