yiyanghkust commited on
Commit
013dac0
1 Parent(s): 2cde036

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -1
README.md CHANGED
@@ -6,4 +6,22 @@ tags:
6
  - environmental-social-corporate-governance
7
  widget:
8
  - text: "Rhonda has been volunteering for several years for a variety of charitable community programs. "
9
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  - environmental-social-corporate-governance
7
  widget:
8
  - text: "Rhonda has been volunteering for several years for a variety of charitable community programs. "
9
+ ---
10
+
11
+ ESG analysis can help investors determine a business' long-term sustainability and identify associated risks. FinBERT-ESG is a FinBERT model fine-tuned on 2,000 manually annotated sentences from firms' ESG reports and annual reports.
12
+
13
+ # How to use
14
+ You can use this model with Transformers pipeline for sentiment analysis.
15
+ ```python
16
+ # tested in transformers==4.18.0
17
+ from transformers import BertTokenizer, BertForSequenceClassification, pipeline
18
+
19
+ finbert = BertForSequenceClassification.from_pretrained('yiyanghkust/finbert-esg',num_labels=4)
20
+ tokenizer = BertTokenizer.from_pretrained('yiyanghkust/finbert-esg')
21
+ nlp = pipeline("text-classification", model=finbert, tokenizer=tokenizer)
22
+ results = nlp('Rhonda has been volunteering for several years for a variety of charitable community programs.')
23
+ print(results) # [{'label': 'Social', 'score': 0.9906041026115417}]
24
+
25
+ ```
26
+
27
+ Visit [FinBERT.AI](https://finbert.ai/) for more details on the recent development of FinBERT.