Created
August 29, 2022 15:45
-
-
Save variux/f08371251f7b9019da7030ebcc1defef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from transformers import pipeline | |
with open("/home/arteaga/prot/scripts/input_denovo_multiple.txt", "r") as f: | |
for line in f: | |
secuencia = [] | |
protgpt2 = pipeline('text-generation', model="/home/arteaga/prot/data/finetuned") | |
sequences = protgpt2(line, max_length=50, min_length = 0, do_sample=True, top_k=950, repetition_penalty=1.2, num_return_sequences=10, eos_token_id=0) | |
with open("/home/arteaga/prot/scripts/output_denovo_multiple.txt", "w") as wf: | |
for seq in sequences: | |
wf.write(seq) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment