Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# cardiffnlp/twitter-roberta-base-latest-tweet-nerd
|
2 |
+
|
3 |
+
This is a [RoBERTa-base](https://huggingface.co/cardiffnlp/twitter-roberta-base-2022-154m) model fine-tuned on [tweet-nerd](https://huggingface.co/datasets/cardiffnlp/super_tweeteval).
|
4 |
+
|
5 |
+
```python
|
6 |
+
from transformers import pipeline
|
7 |
+
text = 'Banana+Nutella snack pack=someone is gonna see me crying in the break room'
|
8 |
+
definition = 'chocolate hazelnut spread manufactured by Ferrero'
|
9 |
+
target = 'Nutella'
|
10 |
+
|
11 |
+
text_input = f"{text} </s> {definition} </s> {target}"
|
12 |
+
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
13 |
+
pipe(text_input)
|
14 |
+
>> [{'label': 'yes', 'score': 0.9993378520011902}]
|
15 |
+
```
|