Update README.md
Browse files
README.md
CHANGED
@@ -115,16 +115,16 @@ This repository contains a trained IndoBERTweet model for text classification. T
|
|
115 |
To use this model, you can load it using the `transformers` library from Hugging Face.
|
116 |
|
117 |
```python
|
118 |
-
|
|
|
119 |
|
120 |
-
|
121 |
|
122 |
-
|
123 |
-
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
outputs = model(**inputs)
|
128 |
```
|
129 |
|
130 |
## Conclusion
|
|
|
115 |
To use this model, you can load it using the `transformers` library from Hugging Face.
|
116 |
|
117 |
```python
|
118 |
+
# Use a pipeline as a high-level helper
|
119 |
+
from transformers import pipeline
|
120 |
|
121 |
+
pipe = pipeline("text-classification", model="Rendika/Trained-indobertweet-balanced-dataset")
|
122 |
|
123 |
+
# Load model directly
|
124 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
125 |
|
126 |
+
tokenizer = AutoTokenizer.from_pretrained("Rendika/Trained-indobertweet-balanced-dataset")
|
127 |
+
model = AutoModelForSequenceClassification.from_pretrained("Rendika/Trained-indobertweet-balanced-dataset")
|
|
|
128 |
```
|
129 |
|
130 |
## Conclusion
|