Views
No views yet
1from huggingface_hub import snapshot_download
2from pathlib import Path
3
4model_name = "genbio-ai/GB.RNA-1.6B-mrna-expression-level-pc3"
5genbio_models_path = Path.home().joinpath('genbio_models', model_name)
6genbio_models_path.mkdir(parents=True, exist_ok=True)
7snapshot_download(repo_id=model_name, local_dir=genbio_models_path)1from modelgenerator.tasks import SequenceRegression
2
3ckpt_path = genbio_models_path.joinpath('fold0', 'model.ckpt')
4model = SequenceRegression.load_from_checkpoint(ckpt_path, strict_loading=False).eval()
5
6collated_batch = model.transform({"sequences": ["ACGT", "AGCT"]})
7logits = model(collated_batch)
8print(logits)