Spaces:
Runtime error
Runtime error
TianlaiChen
commited on
Commit
·
3cfeb78
1
Parent(s):
f560239
gen
Browse files
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
|
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 |
|