Instructions to use SkywalkerLu/TransHLA_II with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SkywalkerLu/TransHLA_II with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="SkywalkerLu/TransHLA_II", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SkywalkerLu/TransHLA_II", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md
Browse files
README.md
CHANGED
|
@@ -26,7 +26,7 @@ pip3 install torch torchvision torchaudio --index-url https://download.pytorch.o
|
|
| 26 |
pip install transformers
|
| 27 |
pip install fair-esm
|
| 28 |
```
|
| 29 |
-
Here is how to use TransHLA_I model to predict
|
| 30 |
|
| 31 |
```python
|
| 32 |
from transformers import AutoTokenizer
|
|
@@ -43,7 +43,7 @@ def pad_inner_lists_to_length(outer_list,target_length=16):
|
|
| 43 |
return outer_list
|
| 44 |
|
| 45 |
|
| 46 |
-
if __name__ = "__main__":
|
| 47 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 48 |
print(f"Using {device} device")
|
| 49 |
tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t33_650M_UR50D")
|
|
|
|
| 26 |
pip install transformers
|
| 27 |
pip install fair-esm
|
| 28 |
```
|
| 29 |
+
Here is how to use TransHLA_I model to predict whether a peptide is an epitope:
|
| 30 |
|
| 31 |
```python
|
| 32 |
from transformers import AutoTokenizer
|
|
|
|
| 43 |
return outer_list
|
| 44 |
|
| 45 |
|
| 46 |
+
if __name__ == "__main__":
|
| 47 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 48 |
print(f"Using {device} device")
|
| 49 |
tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t33_650M_UR50D")
|