Views
No views yet
1from transformers import RobertaForCausalLM, RobertaTokenizer, pipeline
2tokenizer = RobertaTokenizer.from_pretrained("gokceuludogan/ChemBERTaLM")
3model = RobertaForCausalLM.from_pretrained("gokceuludogan/ChemBERTaLM")
4generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
5generator("", max_length=128, do_sample=True)
6# Sample output
7[{'generated_text': 'Cc1ccc(C(=O)N2CCN(C(=O)c3ccc(F)cc3)CC2)cc1'}]1@article{10.1093/bioinformatics/btac482,
2 author = {Uludoğan, Gökçe and Ozkirimli, Elif and Ulgen, Kutlu O. and Karalı, Nilgün Lütfiye and Özgür, Arzucan},
3 title = "{Exploiting Pretrained Biochemical Language Models for Targeted Drug Design}",
4 journal = {Bioinformatics},
5 year = {2022},
6 doi = {10.1093/bioinformatics/btac482},
7 url = {https://doi.org/10.1093/bioinformatics/btac482}
8}