dkarthikeyan1 commited on
Commit
a09686f
·
verified ·
1 Parent(s): e8cefca

Update README.md

Browse files

Fix a versioning issue in the generation code.

Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -44,10 +44,10 @@ num_tcrs = 10
44
  # Define the number of beams to explore (recommended: 3x the number of TCRs)
45
  num_beams = 30
46
 
47
- outputs = tcrt5.generate(**encoded_pmhc, max_new_tokens=25, num_return_sequences=num_tcrs, num_beams=num_beams)
48
 
49
  # Use regex to get out the [TCR] tag
50
- cdr3b_sequences = [re.sub(r'\[.*\]', '', x) for x in tokenizer.batch_decode(outputs, skip_special_tokens=True)]
51
 
52
  >>> cdr3b_sequences
53
 
 
44
  # Define the number of beams to explore (recommended: 3x the number of TCRs)
45
  num_beams = 30
46
 
47
+ outputs = tcrt5.generate(**encoded_pmhc, max_new_tokens=25, num_return_sequences=num_tcrs, num_beams=num_beams, return_dict_in_generate=True)
48
 
49
  # Use regex to get out the [TCR] tag
50
+ cdr3b_sequences = [re.sub(r'\[.*\]', '', x) for x in tokenizer.batch_decode(outputs['sequences'], skip_special_tokens=True)]
51
 
52
  >>> cdr3b_sequences
53