Text Classification
Transformers
PyTorch
bert
protein language model
biology
text-embeddings-inference
Instructions to use GleghornLab/SYNTERACT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GleghornLab/SYNTERACT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="GleghornLab/SYNTERACT")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("GleghornLab/SYNTERACT") model = AutoModelForSequenceClassification.from_pretrained("GleghornLab/SYNTERACT") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -68,7 +68,7 @@ example = tokenizer(example, return_tensors='pt', padding=False).to(device) # to
|
|
| 68 |
with torch.no_grad():
|
| 69 |
logits = model(**example).logits.cpu().detach() # get logits from model
|
| 70 |
|
| 71 |
-
probability = F.softmax(
|
| 72 |
prediction = probability.argmax(dim=-1) # 0 for no interaction, 1 for interaction
|
| 73 |
```
|
| 74 |
|
|
|
|
| 68 |
with torch.no_grad():
|
| 69 |
logits = model(**example).logits.cpu().detach() # get logits from model
|
| 70 |
|
| 71 |
+
probability = F.softmax(logits, dim=-1) # use softmax to get "confidence" in the prediction
|
| 72 |
prediction = probability.argmax(dim=-1) # 0 for no interaction, 1 for interaction
|
| 73 |
```
|
| 74 |
|