TianlaiChen commited on
Commit
3cfeb78
1 Parent(s): f560239
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ def generate_peptide(protein_seq, peptide_length, top_k):
30
  predicted_token_ids = top_k_indices.gather(-1, predicted_indices.unsqueeze(-1)).squeeze(-1)
31
 
32
  generated_peptide = tokenizer.decode(predicted_token_ids, skip_special_tokens=True)
33
- return f"Generated Sequence: {generated_peptide.replace(' ', '')}"
34
 
35
 
36
 
@@ -43,7 +43,7 @@ interface = gr.Interface(
43
  info='Default value is 15'),
44
  gr.Dropdown(choices=[str(i) for i in range(1, 11)], label="Top K Value", default="3",
45
  info='Default value is 3')
46
- ],
47
  outputs="textbox",
48
  )
49
 
 
30
  predicted_token_ids = top_k_indices.gather(-1, predicted_indices.unsqueeze(-1)).squeeze(-1)
31
 
32
  generated_peptide = tokenizer.decode(predicted_token_ids, skip_special_tokens=True)
33
+ return generated_peptide.replace(' ', '')
34
 
35
 
36
 
 
43
  info='Default value is 15'),
44
  gr.Dropdown(choices=[str(i) for i in range(1, 11)], label="Top K Value", default="3",
45
  info='Default value is 3')
46
+ ],
47
  outputs="textbox",
48
  )
49