Update README.md
Browse files
README.md
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
-
|
2 |
---
|
3 |
library_name: transformers
|
4 |
tags:
|
5 |
-
- autotrain
|
6 |
- text-classification
|
7 |
-
base_model: cardiffnlp/twitter-roberta-base-sentiment-latest
|
8 |
widget:
|
9 |
-
- text:
|
10 |
---
|
11 |
|
12 |
# Model Trained Using AutoTrain
|
13 |
|
14 |
- Problem type: Text Classification
|
15 |
|
16 |
-
##
|
17 |
-
loss: 0.0227875504642725
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
|
|
22 |
|
23 |
-
|
|
|
24 |
|
25 |
-
|
|
|
|
|
26 |
|
27 |
-
|
|
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
tags:
|
|
|
4 |
- text-classification
|
|
|
5 |
widget:
|
6 |
+
- text: I love AutoTrain
|
7 |
---
|
8 |
|
9 |
# Model Trained Using AutoTrain
|
10 |
|
11 |
- Problem type: Text Classification
|
12 |
|
13 |
+
## Inference
|
|
|
14 |
|
15 |
+
You can use the following Python code to perform inference with this model using the `transformers` library:
|
16 |
|
17 |
+
```python
|
18 |
+
from transformers import pipeline
|
19 |
|
20 |
+
# Load the model
|
21 |
+
classifier = pipeline("text-classification", model="Phase-Technologies/RoBERTo")
|
22 |
|
23 |
+
# Perform inference
|
24 |
+
text = "I love AutoTrain"
|
25 |
+
result = classifier(text)
|
26 |
|
27 |
+
print(result)
|