jeonseongju
commited on
Commit
โข
dfa96d1
1
Parent(s):
aa07fee
Update README.md
Browse files
README.md
CHANGED
@@ -9,4 +9,19 @@
|
|
9 |
* train_runtime: 1477.3876
|
10 |
* train_steps_per_second: 2.416
|
11 |
* train_loss: 0.3722160959110207
|
12 |
-
* epoch: 5.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
* train_runtime: 1477.3876
|
10 |
* train_steps_per_second: 2.416
|
11 |
* train_loss: 0.3722160959110207
|
12 |
+
* epoch: 5.0
|
13 |
+
|
14 |
+
----
|
15 |
+
### How to use
|
16 |
+
```
|
17 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
18 |
+
|
19 |
+
tokenizer = AutoTokenizer.from_pretrained("seongju/klue-tc-bert-base-multilingual-cased")
|
20 |
+
|
21 |
+
model = AutoModelForSequenceClassification.from_pretrained("seongju/klue-tc-bert-base-multilingual-cased")
|
22 |
+
mapping = {0: 'IT๊ณผํ', 1: '๊ฒฝ์ ', 2: '์ฌํ', 3: '์ํ๋ฌธํ', 4: '์ธ๊ณ', 5: '์คํฌ์ธ ', 6: '์ ์น'}
|
23 |
+
inputs = tokenizer("๋ฐฑ์ ํํผ ๊ฐ๋ฅ์ฑ? ๋จ๋ฏธ์์ ์๋ก์ด ๋ณ์ด ๋ฐ์ด๋ฌ์ค ๊ธ์ ํ์ฐ ", padding=True, truncation=True, max_length=128, return_tensors="pt")
|
24 |
+
outputs = model(**inputs)
|
25 |
+
probs = outputs[0].softmax(1)
|
26 |
+
output = mapping[probs.argmax().item()]
|
27 |
+
```
|