Update README.md
Browse files
README.md
CHANGED
@@ -18,10 +18,10 @@ This adapter was created for usage with the **[Adapters](https://github.com/Adap
|
|
18 |
|
19 |
## Usage
|
20 |
|
21 |
-
First, install `adapters`:
|
22 |
|
23 |
```
|
24 |
-
pip install -U adapters
|
25 |
```
|
26 |
|
27 |
Now, the adapter can be loaded and activated like this:
|
@@ -36,6 +36,8 @@ adapter_name
|
|
36 |
Next, to perform sentiment classification:
|
37 |
|
38 |
```python
|
|
|
|
|
39 |
tokenizer = AutoTokenizer.from_pretrained("roberta-base")
|
40 |
classifier = TextClassificationPipeline(model=model, tokenizer=tokenizer)
|
41 |
classfifier("Adapters are awesome!")
|
|
|
18 |
|
19 |
## Usage
|
20 |
|
21 |
+
First, install `transformers` and `adapters`:
|
22 |
|
23 |
```
|
24 |
+
pip install -U transformers adapters
|
25 |
```
|
26 |
|
27 |
Now, the adapter can be loaded and activated like this:
|
|
|
36 |
Next, to perform sentiment classification:
|
37 |
|
38 |
```python
|
39 |
+
from transformers import AutoTokenizer, TextClassificationPipeline
|
40 |
+
|
41 |
tokenizer = AutoTokenizer.from_pretrained("roberta-base")
|
42 |
classifier = TextClassificationPipeline(model=model, tokenizer=tokenizer)
|
43 |
classfifier("Adapters are awesome!")
|