Update README.md
Browse files
README.md
CHANGED
|
@@ -11,7 +11,7 @@ tags:
|
|
| 11 |
- bert
|
| 12 |
- Inference Endpoints
|
| 13 |
---
|
| 14 |
-
# Model Card for
|
| 15 |
|
| 16 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 17 |
|
|
@@ -28,7 +28,7 @@ Our fine-tuned FinBERT model is a powerful tool designed for sentiment analysis
|
|
| 28 |
- **Language:** English
|
| 29 |
- **Finetuned from model:** yiyanghkust/finbert-tone
|
| 30 |
|
| 31 |
-
### Model Sources
|
| 32 |
|
| 33 |
<!-- Provide the basic links for the model. -->
|
| 34 |
|
|
@@ -47,7 +47,7 @@ from transformers import BertTokenizer, BertForSequenceClassification
|
|
| 47 |
from transformers import pipeline
|
| 48 |
|
| 49 |
# Load the fine-tuned FinBERT model and tokenizer
|
| 50 |
-
finbert = BertForSequenceClassification.from_pretrained('kdave/FineTuned_Finbert, num_labels=3)
|
| 51 |
tokenizer = BertTokenizer.from_pretrained('kdave/FineTuned_Finbert')
|
| 52 |
|
| 53 |
# Create a sentiment-analysis pipeline
|
|
@@ -148,11 +148,12 @@ tokenizer = BertTokenizer.from_pretrained('kdave/FineTuned_Finbert')
|
|
| 148 |
|
| 149 |
# Create a sentiment-analysis pipeline
|
| 150 |
nlp_pipeline = pipeline("sentiment-analysis", model=finbert, tokenizer=tokenizer)
|
|
|
|
|
|
|
| 151 |
Step 3: Perform Sentiment Analysis
|
| 152 |
Now, you're ready to analyze sentiment! Provide the model with sentences related to Indian stock market news:
|
| 153 |
|
| 154 |
-
python
|
| 155 |
-
Copy code
|
| 156 |
# Example sentences related to Indian stock market news
|
| 157 |
sentences = [
|
| 158 |
"The Indian stock market experienced a surge in trading activity.",
|
|
|
|
| 11 |
- bert
|
| 12 |
- Inference Endpoints
|
| 13 |
---
|
| 14 |
+
# Model Card for FineTuned finbert model
|
| 15 |
|
| 16 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 17 |
|
|
|
|
| 28 |
- **Language:** English
|
| 29 |
- **Finetuned from model:** yiyanghkust/finbert-tone
|
| 30 |
|
| 31 |
+
### Model Sources
|
| 32 |
|
| 33 |
<!-- Provide the basic links for the model. -->
|
| 34 |
|
|
|
|
| 47 |
from transformers import pipeline
|
| 48 |
|
| 49 |
# Load the fine-tuned FinBERT model and tokenizer
|
| 50 |
+
finbert = BertForSequenceClassification.from_pretrained('kdave/FineTuned_Finbert', num_labels=3)
|
| 51 |
tokenizer = BertTokenizer.from_pretrained('kdave/FineTuned_Finbert')
|
| 52 |
|
| 53 |
# Create a sentiment-analysis pipeline
|
|
|
|
| 148 |
|
| 149 |
# Create a sentiment-analysis pipeline
|
| 150 |
nlp_pipeline = pipeline("sentiment-analysis", model=finbert, tokenizer=tokenizer)
|
| 151 |
+
```
|
| 152 |
+
|
| 153 |
Step 3: Perform Sentiment Analysis
|
| 154 |
Now, you're ready to analyze sentiment! Provide the model with sentences related to Indian stock market news:
|
| 155 |
|
| 156 |
+
```python
|
|
|
|
| 157 |
# Example sentences related to Indian stock market news
|
| 158 |
sentences = [
|
| 159 |
"The Indian stock market experienced a surge in trading activity.",
|