Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: ko # <-- my language
|
3 |
+
widget:
|
4 |
+
- text: "장 전체가 폭락한 가운데 삼성전자만 상승세를 이어갔다. </s> 삼성전자"
|
5 |
+
tags:
|
6 |
+
- XLM-RoBERTa
|
7 |
+
- KorFin-ASC
|
8 |
+
- financial-sentiment-analysis
|
9 |
+
- sentiment-analysis
|
10 |
+
license:
|
11 |
+
- apache-2.0
|
12 |
+
---
|
13 |
+
## KorFinASC-XLM-RoBERTa
|
14 |
+
Pretrained XLM-RoBERTA-Large transfered to the Finance domain on Korean Language. See [paper]() for more details.
|
15 |
+
|
16 |
+
## Data
|
17 |
+
KorFinASC-XLM-RoBERTa is extensively trained on multiple datasets including KorFin-ASC, [Ko-FinSA](https://github.com/ukairia777/finance_sentiment_corpus), [Ko-ABSA](http://www.drbr.or.kr/datasets/view/?seq=20) and [ModuABSA](https://rlkujwkk7.toastcdn.net/73/NIKL_ABSA_2022_COMPETITION_v1.0.pdf).
|
18 |
+
|
19 |
+
## How to use.
|
20 |
+
|
21 |
+
```python
|
22 |
+
>>> from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
23 |
+
|
24 |
+
>>> tokenizer = AutoTokenizer.from_pretrained("amphora/KorFinASC-XLM-RoBERTa")
|
25 |
+
>>> model = AutoModelForSequenceClassification.from_pretrained("amphora/KorFinASC-XLM-RoBERTa")
|
26 |
+
|
27 |
+
>>> input_str = "장 전체가 폭락한 가운데 삼성전자만 상승세를 이어갔다. </s> 삼성전자"
|
28 |
+
>>> input = tokenizer(input_str, return_tensors='pt')
|
29 |
+
>>> output = model.generate(**input, max_length=20)
|
30 |
+
|
31 |
+
```
|