Trang Dang commited on
Commit
e8807d2
1 Parent(s): a5d18f6

customize cache dir

Browse files
Files changed (1) hide show
  1. run.py +3 -2
run.py CHANGED
@@ -8,8 +8,9 @@ import os
8
  def pred(src):
9
  # os.environ['HUGGINGFACE_HUB_HOME'] = './.cache'
10
  # Load the model configuration
11
- model_config = SamConfig.from_pretrained("facebook/sam-vit-base")
12
- processor = SamProcessor.from_pretrained("facebook/sam-vit-base")
 
13
 
14
  # Create an instance of the model architecture with the loaded configuration
15
  my_sam_model = SamModel(config=model_config)
 
8
  def pred(src):
9
  # os.environ['HUGGINGFACE_HUB_HOME'] = './.cache'
10
  # Load the model configuration
11
+ cache_dir = "/code/cache"
12
+ model_config = SamConfig.from_pretrained("facebook/sam-vit-base", cache_dir=cache_dir)
13
+ processor = SamProcessor.from_pretrained("facebook/sam-vit-base", cache_dir=cache_dir)
14
 
15
  # Create an instance of the model architecture with the loaded configuration
16
  my_sam_model = SamModel(config=model_config)