Spaces:
Sleeping
Sleeping
Trang Dang
commited on
Commit
•
4e3f3b8
1
Parent(s):
8e6cf71
test
Browse files
run.py
CHANGED
@@ -12,7 +12,7 @@ def pred(src):
|
|
12 |
|
13 |
# Create an instance of the model architecture with the loaded configuration
|
14 |
my_sam_model = SamModel(config=model_config)
|
15 |
-
# #Update the model by loading the weights from saved file
|
16 |
my_sam_model.load_state_dict(torch.load("sam_model.pth", map_location=torch.device('cpu')))
|
17 |
|
18 |
new_image = np.array(Image.open(src).convert("RGB"))
|
|
|
12 |
|
13 |
# Create an instance of the model architecture with the loaded configuration
|
14 |
my_sam_model = SamModel(config=model_config)
|
15 |
+
# #Update the model by loading the weights from saved file
|
16 |
my_sam_model.load_state_dict(torch.load("sam_model.pth", map_location=torch.device('cpu')))
|
17 |
|
18 |
new_image = np.array(Image.open(src).convert("RGB"))
|