Fix: Add missing model path definition in example code
#41
by
anon-repair-bot
- opened
README.md
CHANGED
@@ -25,8 +25,12 @@ This sentiment analysis model has been integrated into [TweetNLP](https://github
|
|
25 |
## Example Pipeline
|
26 |
```python
|
27 |
from transformers import pipeline
|
|
|
|
|
28 |
sentiment_task = pipeline("sentiment-analysis", model=model_path, tokenizer=model_path)
|
29 |
sentiment_task("Covid cases are increasing fast!")
|
|
|
|
|
30 |
```
|
31 |
```
|
32 |
[{'label': 'Negative', 'score': 0.7236}]
|
|
|
25 |
## Example Pipeline
|
26 |
```python
|
27 |
from transformers import pipeline
|
28 |
+
|
29 |
+
model_path = "cardiffnlp/twitter-roberta-base-sentiment-latest"
|
30 |
sentiment_task = pipeline("sentiment-analysis", model=model_path, tokenizer=model_path)
|
31 |
sentiment_task("Covid cases are increasing fast!")
|
32 |
+
|
33 |
+
print(result)
|
34 |
```
|
35 |
```
|
36 |
[{'label': 'Negative', 'score': 0.7236}]
|