Update README.md
Browse files
README.md
CHANGED
@@ -126,16 +126,16 @@ The model was evaluated using precision, recall, and F1 scores, with the followi
|
|
126 |
To use this model, you can load it using the Hugging Face Transformers library:
|
127 |
|
128 |
```python
|
129 |
-
|
|
|
130 |
|
131 |
-
|
132 |
|
133 |
-
|
134 |
-
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
outputs = model(**inputs)
|
139 |
```
|
140 |
|
141 |
## Conclusion
|
|
|
126 |
To use this model, you can load it using the Hugging Face Transformers library:
|
127 |
|
128 |
```python
|
129 |
+
# Use a pipeline as a high-level helper
|
130 |
+
from transformers import pipeline
|
131 |
|
132 |
+
pipe = pipeline("text-classification", model="Rendika/Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset")
|
133 |
|
134 |
+
# Load model directly
|
135 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
136 |
|
137 |
+
tokenizer = AutoTokenizer.from_pretrained("Rendika/Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset")
|
138 |
+
model = AutoModelForSequenceClassification.from_pretrained("Rendika/Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset")
|
|
|
139 |
```
|
140 |
|
141 |
## Conclusion
|