Spaces:
Runtime error
Runtime error
liuyizhang
commited on
Commit
•
68cab41
1
Parent(s):
eb442cd
update app.py
Browse files
app.py
CHANGED
@@ -242,7 +242,7 @@ groundingdino_model = load_model_hf(config_file, ckpt_repo_id, ckpt_filenmae)
|
|
242 |
|
243 |
# initialize SAM
|
244 |
logger.info(f"initialize SAM model...")
|
245 |
-
sam_model = build_sam(checkpoint=sam_checkpoint)
|
246 |
sam_predictor = SamPredictor(sam_model)
|
247 |
sam_mask_generator = SamAutomaticMaskGenerator(sam_model)
|
248 |
|
|
|
242 |
|
243 |
# initialize SAM
|
244 |
logger.info(f"initialize SAM model...")
|
245 |
+
sam_model = build_sam(checkpoint=sam_checkpoint).to(device)
|
246 |
sam_predictor = SamPredictor(sam_model)
|
247 |
sam_mask_generator = SamAutomaticMaskGenerator(sam_model)
|
248 |
|
utils.py
CHANGED
@@ -5,7 +5,6 @@ import datetime
|
|
5 |
from pynvml import *
|
6 |
from pprint import pprint
|
7 |
|
8 |
-
|
9 |
def physical_system_time():
|
10 |
return {"system_time": datetime.datetime.fromtimestamp(psutil.boot_time()).strftime("%Y-%m-%d %H:%M:%S")}
|
11 |
|
|
|
5 |
from pynvml import *
|
6 |
from pprint import pprint
|
7 |
|
|
|
8 |
def physical_system_time():
|
9 |
return {"system_time": datetime.datetime.fromtimestamp(psutil.boot_time()).strftime("%Y-%m-%d %H:%M:%S")}
|
10 |
|