Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -123,12 +123,12 @@ def predict_bind(base_model_path,PEFT_model_path,input_seq):
|
|
| 123 |
|
| 124 |
binding_site=[]
|
| 125 |
# Print the predicted labels for each token
|
| 126 |
-
for n, token, prediction in
|
| 127 |
if token not in ['<pad>', '<cls>', '<eos>']:
|
| 128 |
print((token, id2label[prediction]))
|
| 129 |
if prediction == 1:
|
| 130 |
-
print((
|
| 131 |
-
binding_site.append(
|
| 132 |
return binding_site
|
| 133 |
|
| 134 |
# fine-tuning function
|
|
|
|
| 123 |
|
| 124 |
binding_site=[]
|
| 125 |
# Print the predicted labels for each token
|
| 126 |
+
for n, token, prediction in zip(tokens, predictions[0].numpy()):
|
| 127 |
if token not in ['<pad>', '<cls>', '<eos>']:
|
| 128 |
print((token, id2label[prediction]))
|
| 129 |
if prediction == 1:
|
| 130 |
+
print((token, id2label[prediction]))
|
| 131 |
+
binding_site.append(token, id2label[prediction])
|
| 132 |
return binding_site
|
| 133 |
|
| 134 |
# fine-tuning function
|