Update README.md
Browse files
README.md
CHANGED
@@ -154,23 +154,44 @@ TrainingArguments(
|
|
154 |
### ✅ Evaluation Results
|
155 |
|
156 |
```
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
```
|
162 |
|
163 |
---
|
164 |
|
165 |
## 🔎 Usage
|
166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
```python
|
168 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
169 |
import torch
|
170 |
|
171 |
# Load model and tokenizer
|
172 |
-
model = AutoModelForSequenceClassification.from_pretrained("ihsan31415/
|
173 |
-
tokenizer = AutoTokenizer.from_pretrained("ihsan31415/
|
174 |
|
175 |
# Example input
|
176 |
text = "IHSG diprediksi melemah karena sentimen global negatif"
|
|
|
154 |
### ✅ Evaluation Results
|
155 |
|
156 |
```
|
157 |
+
|
158 |
+
eval_loss = 0.10230540484189987
|
159 |
+
eval_accuracy = 0.9749255130394028
|
160 |
+
eval_precision = 0.9749490510899772
|
161 |
+
eval_recall = 0.9749255130394028
|
162 |
+
eval_f1 = 0.9749326327197978
|
163 |
+
eval_runtime = 71.9098
|
164 |
+
eval_samples_per_second = 415.395
|
165 |
+
eval_steps_per_second = 1.627
|
166 |
+
epoch = 5.0
|
167 |
+
|
168 |
```
|
169 |
|
170 |
---
|
171 |
|
172 |
## 🔎 Usage
|
173 |
|
174 |
+
```python
|
175 |
+
from transformers import pipeline
|
176 |
+
|
177 |
+
pretrained_name = "ihsan31415/indo-roBERTa-financial-sentiment"
|
178 |
+
|
179 |
+
nlp = pipeline(
|
180 |
+
"sentiment-analysis",
|
181 |
+
model=pretrained_name,
|
182 |
+
tokenizer=pretrained_name
|
183 |
+
)
|
184 |
+
|
185 |
+
nlp("IHSG diprediksi melemah karena sentimen global negatif")
|
186 |
+
```
|
187 |
+
|
188 |
```python
|
189 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
190 |
import torch
|
191 |
|
192 |
# Load model and tokenizer
|
193 |
+
model = AutoModelForSequenceClassification.from_pretrained("ihsan31415/indo-roBERTa-financial-sentiment")
|
194 |
+
tokenizer = AutoTokenizer.from_pretrained("ihsan31415/indo-roBERTa-financial-sentiment")
|
195 |
|
196 |
# Example input
|
197 |
text = "IHSG diprediksi melemah karena sentimen global negatif"
|