Skip to content

Commit

Permalink
Update qg_pipeline.py
Browse files Browse the repository at this point in the history
  • Loading branch information
huu4ontocord authored Dec 26, 2022
1 parent 34dd5f6 commit a017d8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qg_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __call__(self, inputs: str, **generate_kwargs):
default_answers=[]
if 'default_answers' in generate_kwargs:
default_answers = generate_kwargs['default_answers']
if type(default_answers[0]) is str:
if default_answers and type(default_answers[0]) is str:
default_answers = [default_answers] * len(inputs)
if len(default_answers) < len(inputs):
default_answers.extend([[]]*(len(inputs)-len(default_answers)))
Expand Down Expand Up @@ -386,7 +386,7 @@ def pipeline(
# For tuple we have (tokenizer name, {kwargs})
tokenizer = AutoTokenizer.from_pretrained(tokenizer[0], **tokenizer[1])
else:
print(tokenizer)
#print(tokenizer)
tokenizer = AutoTokenizer.from_pretrained(tokenizer)


Expand Down

0 comments on commit a017d8e

Please sign in to comment.