Commit
·
ffd5e25
1
Parent(s):
d36cdbb
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,7 +12,8 @@ The model can be loaded and used to make predictions as follows:
|
|
| 12 |
```
|
| 13 |
from transformers import pipeline
|
| 14 |
model_path = 'clips/republic'
|
| 15 |
-
pipe = pipeline(task="text-classification",
|
|
|
|
| 16 |
text = … # load your text here
|
| 17 |
output = pipe(text)
|
| 18 |
prediction = output[0]['label'] # 0=”neutral”; 1=”positive”; 2=”negative”
|
|
|
|
| 12 |
```
|
| 13 |
from transformers import pipeline
|
| 14 |
model_path = 'clips/republic'
|
| 15 |
+
pipe = pipeline(task="text-classification",
|
| 16 |
+
model=model_path, tokenizer=model_path)
|
| 17 |
text = … # load your text here
|
| 18 |
output = pipe(text)
|
| 19 |
prediction = output[0]['label'] # 0=”neutral”; 1=”positive”; 2=”negative”
|