omni-research commited on
Commit
0621bf5
1 Parent(s): d8920cd

use HF_TOKEN

Browse files
Files changed (2) hide show
  1. dataset/processor.py +1 -1
  2. tools/utils.py +2 -2
dataset/processor.py CHANGED
@@ -86,7 +86,7 @@ class Processor(object):
86
  model_name_or_path,
87
  padding_side='left',
88
  trust_remote_code=True,
89
- # token=HF_TOKEN,
90
  )
91
  self.processor = CustomImageProcessor(sub_processor)
92
  self.tokenizer = sub_processor.tokenizer
 
86
  model_name_or_path,
87
  padding_side='left',
88
  trust_remote_code=True,
89
+ token=HF_TOKEN,
90
  )
91
  self.processor = CustomImageProcessor(sub_processor)
92
  self.tokenizer = sub_processor.tokenizer
tools/utils.py CHANGED
@@ -55,7 +55,7 @@ def load_model_and_processor(model_name_or_path, max_n_frames=8):
55
  model_config = LlavaConfig.from_pretrained(
56
  model_name_or_path,
57
  trust_remote_code=True,
58
- # token=HF_TOKEN,
59
  )
60
  model = TarsierForConditionalGeneration.from_pretrained(
61
  model_name_or_path,
@@ -63,7 +63,7 @@ def load_model_and_processor(model_name_or_path, max_n_frames=8):
63
  device_map='auto',
64
  torch_dtype=torch.float16,
65
  trust_remote_code=True,
66
- # token=HF_TOKEN,
67
  )
68
  model.eval()
69
  return model, processor
 
55
  model_config = LlavaConfig.from_pretrained(
56
  model_name_or_path,
57
  trust_remote_code=True,
58
+ token=HF_TOKEN,
59
  )
60
  model = TarsierForConditionalGeneration.from_pretrained(
61
  model_name_or_path,
 
63
  device_map='auto',
64
  torch_dtype=torch.float16,
65
  trust_remote_code=True,
66
+ token=HF_TOKEN,
67
  )
68
  model.eval()
69
  return model, processor