burningfalls
commited on
Commit
โข
0a5b46b
1
Parent(s):
ff638cb
Update README.md
Browse files
README.md
CHANGED
@@ -8,13 +8,19 @@ metrics:
|
|
8 |
- accuracy
|
9 |
pipeline_tag: text-classification
|
10 |
---
|
11 |
-
#
|
12 |
|
|
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
---
|
16 |
|
17 |
-
#
|
18 |
```python
|
19 |
# my env
|
20 |
python==3.11.3
|
@@ -29,7 +35,7 @@ transformers>=4.0
|
|
29 |
|
30 |
---
|
31 |
|
32 |
-
#
|
33 |
```python
|
34 |
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
|
35 |
from transformers import TextClassificationPipeline
|
@@ -48,7 +54,7 @@ def load_bert():
|
|
48 |
|
49 |
---
|
50 |
|
51 |
-
#
|
52 |
```python
|
53 |
import re
|
54 |
import sentiments
|
@@ -63,7 +69,7 @@ def predict_sentiment(text):
|
|
63 |
|
64 |
---
|
65 |
|
66 |
-
#
|
67 |
```python
|
68 |
Feel = [
|
69 |
{"label": "๊ฐ๋ํ, ๋ถ์ฐํ", "index": 0},
|
|
|
8 |
- accuracy
|
9 |
pipeline_tag: text-classification
|
10 |
---
|
11 |
+
# 1. Introduction
|
12 |
|
13 |
+
## 1.1 examples
|
14 |
|
15 |
+
![examples](https://github.com/BurningFalls/algorithm-study/assets/30232837/596e5010-53b6-4598-8dd3-4ef7fc65e60e)
|
16 |
+
|
17 |
+
## 1.2 f1-score
|
18 |
+
|
19 |
+
![bert_accuracy](https://github.com/BurningFalls/algorithm-study/assets/30232837/58830340-aebe-4dc2-85fa-313138ac3020)
|
20 |
|
21 |
---
|
22 |
|
23 |
+
# 2. Requirements
|
24 |
```python
|
25 |
# my env
|
26 |
python==3.11.3
|
|
|
35 |
|
36 |
---
|
37 |
|
38 |
+
# 3. Load
|
39 |
```python
|
40 |
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
|
41 |
from transformers import TextClassificationPipeline
|
|
|
54 |
|
55 |
---
|
56 |
|
57 |
+
# 4. Usage
|
58 |
```python
|
59 |
import re
|
60 |
import sentiments
|
|
|
69 |
|
70 |
---
|
71 |
|
72 |
+
# 5. sentiments.py
|
73 |
```python
|
74 |
Feel = [
|
75 |
{"label": "๊ฐ๋ํ, ๋ถ์ฐํ", "index": 0},
|