Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -261,13 +261,13 @@ def predict_peptide_from_file(base_model_path, finetuned_model_path, file_obj, m
|
|
| 261 |
ppl_value = compute_pseudo_perplexity(loaded_model, tokenizer, protein_seq, peptide_seq)
|
| 262 |
plddt_value, iPTM_value = compute_plddt_iptm(protein_seq, peptide_seq)
|
| 263 |
|
| 264 |
-
results.append([
|
| 265 |
|
| 266 |
#predict peptides
|
| 267 |
binders = generate_peptide_for_single_sequence(loaded_model, tokenizer, protein_seq, peptide_length, top_k, num_binders)
|
| 268 |
|
| 269 |
for binder, ppl, plddt, iptm in binders:
|
| 270 |
-
results.append([
|
| 271 |
|
| 272 |
results_df = pd.DataFrame(results, columns=['Input Sequence', 'Binder', 'PPL', 'pLDDT', 'iPTM', 'GT_Flag'])
|
| 273 |
|
|
|
|
| 261 |
ppl_value = compute_pseudo_perplexity(loaded_model, tokenizer, protein_seq, peptide_seq)
|
| 262 |
plddt_value, iPTM_value = compute_plddt_iptm(protein_seq, peptide_seq)
|
| 263 |
|
| 264 |
+
results.append([protein_seq, binder, ppl, plddt, iptm, 1]) # flag 1 for ground truth peptide
|
| 265 |
|
| 266 |
#predict peptides
|
| 267 |
binders = generate_peptide_for_single_sequence(loaded_model, tokenizer, protein_seq, peptide_length, top_k, num_binders)
|
| 268 |
|
| 269 |
for binder, ppl, plddt, iptm in binders:
|
| 270 |
+
results.append([protein_seq, binder, ppl, plddt, iptm, 0]) # flag 0 for generated peptide
|
| 271 |
|
| 272 |
results_df = pd.DataFrame(results, columns=['Input Sequence', 'Binder', 'PPL', 'pLDDT', 'iPTM', 'GT_Flag'])
|
| 273 |
|