Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
from transformers import T5Tokenizer, T5ForConditionalGeneration
tokenizer = T5Tokenizer.from_pretrained("QizhiPei/biot5-base-mol2text", model_max_length=512)
model = T5ForConditionalGeneration.from_pretrained('QizhiPei/biot5-base-mol2text')
task_definition = 'Definition: You are given a molecule SELFIES. Your job is to generate the molecule description in English that fits the molecule SELFIES.\n\n'
selfies_input = '[C][C][Branch1][C][O][C][C][=Branch1][C][=O][C][=Branch1][C][=O][O-1]'
task_input = f'Now complete the following example -\nInput: <bom>{selfies_input}<eom>\nOutput: '
model_input = task_definition + task_input
input_ids = tokenizer(model_input, return_tensors="pt").input_ids
generation_config = model.generation_config
generation_config.max_length = 512
generation_config.num_beams = 1
outputs = model.generate(input_ids, generation_config=generation_config)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
References
For more information, please refer to our paper and GitHub repository.
biot5-base-mol2text huggingface.co is an AI model on huggingface.co that provides biot5-base-mol2text's model effect (), which can be used instantly with this QizhiPei biot5-base-mol2text model. huggingface.co supports a free trial of the biot5-base-mol2text model, and also provides paid use of the biot5-base-mol2text. Support call biot5-base-mol2text model through api, including Node.js, Python, http.
biot5-base-mol2text huggingface.co is an online trial and call api platform, which integrates biot5-base-mol2text's modeling effects, including api services, and provides a free online trial of biot5-base-mol2text, you can try biot5-base-mol2text online for free by clicking the link below.
QizhiPei biot5-base-mol2text online free url in huggingface.co:
biot5-base-mol2text is an open source model from GitHub that offers a free installation service, and any user can find biot5-base-mol2text on GitHub to install. At the same time, huggingface.co provides the effect of biot5-base-mol2text install, users can directly use biot5-base-mol2text installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
biot5-base-mol2text install url in huggingface.co: