Instructions to use Lutech-AI/I-SPIn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lutech-AI/I-SPIn with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import ISPIn model = ISPIn.from_pretrained("Lutech-AI/I-SPIn", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
aa9a9b9
1
Parent(s): 041c9fe
Update README.md
Browse files
README.md
CHANGED
|
@@ -41,16 +41,16 @@ If you installed the package correctly, you can retrieve labels in the following
|
|
| 41 |
```python
|
| 42 |
from ispin.ISPIn import ISPIn
|
| 43 |
model = ISPIn.from_pretrained('Lutech-AI/I-SPIn')
|
| 44 |
-
premises = ['
|
| 45 |
-
hypothesis = ['
|
| 46 |
premises_embeddings = model(premises)
|
| 47 |
hypothesis_embeddings = model(hypothesis)
|
| 48 |
predictions = model.predict(
|
| 49 |
premises_embeddings,
|
| 50 |
hypothesis_embeddings,
|
| 51 |
-
one_to_many =
|
| 52 |
)
|
| 53 |
-
print(predictions) # -> [0
|
| 54 |
```
|
| 55 |
|
| 56 |
## Usage #2 (cloning repo) (will be deleted)
|
|
|
|
| 41 |
```python
|
| 42 |
from ispin.ISPIn import ISPIn
|
| 43 |
model = ISPIn.from_pretrained('Lutech-AI/I-SPIn')
|
| 44 |
+
premises = ['Il modello sta funzionando correttamente', 'Il modello non funziona correttamente']
|
| 45 |
+
hypothesis = ['Testando il funzionamento del modello']
|
| 46 |
premises_embeddings = model(premises)
|
| 47 |
hypothesis_embeddings = model(hypothesis)
|
| 48 |
predictions = model.predict(
|
| 49 |
premises_embeddings,
|
| 50 |
hypothesis_embeddings,
|
| 51 |
+
one_to_many = False
|
| 52 |
)
|
| 53 |
+
print(predictions) # -> [0 -1]
|
| 54 |
```
|
| 55 |
|
| 56 |
## Usage #2 (cloning repo) (will be deleted)
|