Spaces:
Sleeping
Sleeping
new pre-processing function
Browse files
app.py
CHANGED
@@ -271,6 +271,8 @@ def process_family_sequence(protein_fasta):
|
|
271 |
|
272 |
def process_single_sequence(protein_fasta): #, protein_file
|
273 |
protein_sequence, error_msg = preprocess_protein_sequence(protein_fasta)
|
|
|
|
|
274 |
|
275 |
encoded_input = tokenizer([protein_sequence], padding=True, truncation=True, max_length=512, return_tensors="pt")
|
276 |
input_ids = encoded_input["input_ids"]
|
|
|
271 |
|
272 |
def process_single_sequence(protein_fasta): #, protein_file
|
273 |
protein_sequence, error_msg = preprocess_protein_sequence(protein_fasta)
|
274 |
+
if error_msg:
|
275 |
+
return None, None, None, error_msg
|
276 |
|
277 |
encoded_input = tokenizer([protein_sequence], padding=True, truncation=True, max_length=512, return_tensors="pt")
|
278 |
input_ids = encoded_input["input_ids"]
|