Model Card for Model ID
Model Details
Model Description
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
- Developed by: [Zhi Huang(Sichuan university)]
- Funded by [optional]: [More Information Needed]
- Shared by [optional]: [Zhi Huang(Sichuan university)]
- Model type: [Regression]
- Language(s) (NLP): [NLP]
- License: [Commercial use requires author's permission]
- Finetuned from model [optional]: [Chat-GPT]
Model Sources [optional]
- Datasets: https://github.com/525514353/Chem-GPT
- Paper [optional]: [More Information Needed]
- Demo [optional]: [More Information Needed]
Uses
Direct Use
[load the model and tokenizer
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ML4chemistry/hydroxyl_radical_reaction_constants")
model = AutoModelForSequenceClassification.from_pretrained("ML4chemistry/hydroxyl_radical_reaction_constants")
prediction of single compound
sample='Cc1noc(N
S(=O)c2ccc(N)cc2)c1C'#SMILES of sulfisoxazole
tokenized=tokenizer(sample,return_tensors='pt')
output=model(input_ids=tokenized['input_ids'],attention_mask=tokenized['attention_mask']).logits
print(f'the reaction_constants of sulfisoxazole with hydroxyl_radical is {output.detach().numpy()[0][0]}')
the reaction_constants of sulfisoxazole with hydroxyl_radical is 9.812551498413086
prediction of mutiple compound
sample=['Cc1noc(N
S(=O)c2ccc(N)cc2)c1C','Cc1sc(N
S(=O)c2ccc(N)cc2)nn1']#SMILES of sulfisoxazole and sulfamethizole
tokenized=tokenizer(sample,return_tensors='pt',padding=True)
output=model(input_ids=tokenized['input_ids'],attention_mask=tokenized['attention_mask']).logits
print(f'the reaction_constants of sulfisoxazole with hydroxyl_radical is {output.detach().numpy()[0][0]}')
print(f'the reaction_constants of sulfamethizole with hydroxyl_radical is {output.detach().numpy()[1][0]}')]
the reaction_constants of sulfisoxazole with hydroxyl_radical is 9.812551498413086
the reaction_constants of sulfamethizole with hydroxyl_radical is 9.78555965423584