Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -154,7 +154,7 @@ def generate_peptide_for_single_sequence(model, tokenizer, protein_seq, peptide_
|
|
| 154 |
n = 0
|
| 155 |
for _ in range(num_binders):
|
| 156 |
n += 1
|
| 157 |
-
print("n in num_binders:", n)
|
| 158 |
# Generate binder
|
| 159 |
masked_peptide = '<mask>' * peptide_length
|
| 160 |
input_sequence = protein_seq + masked_peptide
|
|
@@ -231,9 +231,9 @@ def predict_peptide_from_file(base_model_path, finetuned_model_path, file_obj, p
|
|
| 231 |
binders = generate_peptide_for_single_sequence(loaded_model, tokenizer, seq, peptide_length, top_k, num_binders)
|
| 232 |
for binder, ppl in binders:
|
| 233 |
results.append([seq, binder, ppl])
|
| 234 |
-
|
| 235 |
results_df = pd.DataFrame(results, columns=['Input Sequence', 'Binder', 'Pseudo Perplexity'])
|
| 236 |
-
print(results_df)
|
| 237 |
|
| 238 |
outpath = (
|
| 239 |
Path.cwd() / "predicted_peptides.csv"
|
|
|
|
| 154 |
n = 0
|
| 155 |
for _ in range(num_binders):
|
| 156 |
n += 1
|
| 157 |
+
#print("n in num_binders:", n)
|
| 158 |
# Generate binder
|
| 159 |
masked_peptide = '<mask>' * peptide_length
|
| 160 |
input_sequence = protein_seq + masked_peptide
|
|
|
|
| 231 |
binders = generate_peptide_for_single_sequence(loaded_model, tokenizer, seq, peptide_length, top_k, num_binders)
|
| 232 |
for binder, ppl in binders:
|
| 233 |
results.append([seq, binder, ppl])
|
| 234 |
+
print("Predicted sample: ", i)
|
| 235 |
results_df = pd.DataFrame(results, columns=['Input Sequence', 'Binder', 'Pseudo Perplexity'])
|
| 236 |
+
#print(results_df)
|
| 237 |
|
| 238 |
outpath = (
|
| 239 |
Path.cwd() / "predicted_peptides.csv"
|