Update README.md
Browse files
README.md
CHANGED
@@ -37,6 +37,19 @@ More information needed
|
|
37 |
|
38 |
More information needed
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
## Training and evaluation data
|
41 |
|
42 |
More information needed
|
|
|
37 |
|
38 |
More information needed
|
39 |
|
40 |
+
## How to use
|
41 |
+
|
42 |
+
You can use this model directly with a pipeline for text classification:
|
43 |
+
|
44 |
+
```python
|
45 |
+
>>> from transformers import pipeline
|
46 |
+
>>> roberta_sentiment = pipeline("text-classification", model="rasyosef/roberta-base-finetuned-sst2")
|
47 |
+
>>> roberta_sentiment(["This movie was awesome.", "The movie was boring."])
|
48 |
+
|
49 |
+
[{'label': 'positive', 'score': 0.9995689988136292},
|
50 |
+
{'label': 'negative', 'score': 0.9987605810165405}]
|
51 |
+
```
|
52 |
+
|
53 |
## Training and evaluation data
|
54 |
|
55 |
More information needed
|