ZJU-Fangyin commited on
Commit
4b74b2f
1 Parent(s): a4a41af

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -1
README.md CHANGED
@@ -26,7 +26,13 @@ Molecule generation example:
26
 
27
  >>> sf_input = tokenizer("[C][=C][C][=C][C][=C][Ring1][=Branch1]", return_tensors="pt")
28
  >>> # beam search
29
- >>> molecules = model.generate(input_ids=sf_input["input_ids"],attention_mask=sf_input["attention_mask"],max_length=20,min_length=5,num_return_sequences=5,num_beams=5,past_prompt=None)
 
 
 
 
 
 
30
  >>> sf_output = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True).replace(" ","") for g in molecules]
31
  ['[C][=C][C][=C][C][=C][Ring1][=Branch1]', '[C][=C][C][=C][C][=C][C][=C][Ring1][=Branch1]', '[C][=C][C][=C][C][=C][Ring1][=Branch1][C@H1][C][=C][C][=C][C][=C][Ring1][=Branch1]', '[C][=C][C][=C][C][=C][Ring1][=Branch1][C][=C][C][=C][C][=C][Ring1][=Branch1]', '[C][=C][C][=C][C][=C][Ring1][=Branch1][C@H1][=C][C][=C][Ring1][=Branch1]']
32
  ```
 
26
 
27
  >>> sf_input = tokenizer("[C][=C][C][=C][C][=C][Ring1][=Branch1]", return_tensors="pt")
28
  >>> # beam search
29
+ >>> molecules = model.generate(input_ids=sf_input["input_ids"],
30
+ attention_mask=sf_input["attention_mask"],
31
+ max_length=20,
32
+ min_length=5,
33
+ num_return_sequences=5,
34
+ num_beams=5,
35
+ past_prompt=None)
36
  >>> sf_output = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True).replace(" ","") for g in molecules]
37
  ['[C][=C][C][=C][C][=C][Ring1][=Branch1]', '[C][=C][C][=C][C][=C][C][=C][Ring1][=Branch1]', '[C][=C][C][=C][C][=C][Ring1][=Branch1][C@H1][C][=C][C][=C][C][=C][Ring1][=Branch1]', '[C][=C][C][=C][C][=C][Ring1][=Branch1][C][=C][C][=C][C][=C][Ring1][=Branch1]', '[C][=C][C][=C][C][=C][Ring1][=Branch1][C@H1][=C][C][=C][Ring1][=Branch1]']
38
  ```