thenlper AhVir commited on
Commit
458d157
·
verified ·
1 Parent(s): c51589a

Update gme_inference.py (#14)

Browse files

- Update gme_inference.py (543f9537e1e58b9a08bdf9cae7100e0059bc7f7d)


Co-authored-by: Tanvir Ahmed <AhVir@users.noreply.huggingface.co>

Files changed (1) hide show
  1. gme_inference.py +2 -2
gme_inference.py CHANGED
@@ -37,7 +37,7 @@ class GmeQwen2VL:
37
  model_name, min_pixels=min_pixels, max_pixels=max_pixels, **kwargs
38
  )
39
  self.processor.tokenizer.padding_side = 'right'
40
- self.defualt_instruction = 'You are a helpful assistant.'
41
  self.sep = ' '
42
 
43
  def forward(
@@ -97,7 +97,7 @@ class GmeQwen2VL:
97
  input_texts, input_images = list(), list()
98
  for t, i in zip(texts, images):
99
  if not is_query or instruction is None:
100
- instruction = self.defualt_instruction
101
  input_str = ''
102
  if i is None:
103
  input_images = None # All examples in the same batch are consistent
 
37
  model_name, min_pixels=min_pixels, max_pixels=max_pixels, **kwargs
38
  )
39
  self.processor.tokenizer.padding_side = 'right'
40
+ self.default_instruction = 'You are a helpful assistant.'
41
  self.sep = ' '
42
 
43
  def forward(
 
97
  input_texts, input_images = list(), list()
98
  for t, i in zip(texts, images):
99
  if not is_query or instruction is None:
100
+ instruction = self.default_instruction
101
  input_str = ''
102
  if i is None:
103
  input_images = None # All examples in the same batch are consistent