kk08 commited on
Commit
f87bb19
1 Parent(s): bf0c373

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -0
README.md CHANGED
@@ -21,6 +21,23 @@ This model is a fine-tuned version of [ProsusAI/finbert](https://huggingface.co/
21
  It achieves the following results on the evaluation set:
22
  - Loss: 0.3823
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  ## Model description
25
 
26
  This model fine-tunes the [ProsusAI/finbert](https://huggingface.co/ProsusAI/finbert), which is a pre-trained NLP model to analyze the sentiment of the financial text.
 
21
  It achieves the following results on the evaluation set:
22
  - Loss: 0.3823
23
 
24
+ ```python
25
+ from transformers import BertTokenizer, BertForSequenceClassification
26
+ from transformers import pipeline
27
+
28
+ tokenizer = BertTokenizer.from_pretrained("kk08/CryptoBERT")
29
+ model = BertForSequenceClassification.from_pretrained("kk08/CryptoBERT")
30
+
31
+ classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
32
+ text = "Bitcoin (BTC) touches $29k, Ethereum (ETH) Set To Explode, RenQ Finance (RENQ) Crosses Massive Milestone"
33
+ result = classifier(text)
34
+ print(result)
35
+
36
+ ```
37
+ [{'label': 'LABEL_1', 'score': 0.9678454399108887}]
38
+ ```
39
+
40
+ ```
41
  ## Model description
42
 
43
  This model fine-tunes the [ProsusAI/finbert](https://huggingface.co/ProsusAI/finbert), which is a pre-trained NLP model to analyze the sentiment of the financial text.