Text Classification
Transformers
TensorBoard
Safetensors
bert
Generated from Trainer
Eval Results (legacy)
text-embeddings-inference
Run this model with HF Jobs
Run Sharpaxis/FIN_BERT_sentiment on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Sharpaxis/FIN_BERT_sentiment. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Sharpaxis/FIN_BERT_sentiment on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Sharpaxis/FIN_BERT_sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sharpaxis/FIN_BERT_sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Sharpaxis/FIN_BERT_sentiment")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Sharpaxis/FIN_BERT_sentiment") model = AutoModelForSequenceClassification.from_pretrained("Sharpaxis/FIN_BERT_sentiment", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files78 unmodified lines79808178 unmodified lines- Pytorch 2.5.1- Datasets 3.1.0- Tokenizers 0.20.378 unmodified lines79808182838485868788899091929394959697989910010110210310410510610778 unmodified lines- Pytorch 2.5.1- Datasets 3.1.0- Tokenizers 0.20.3### code to use in pipelineimport matplotlib.pyplot as pltimport plotly.graph_objects as go%matplotlib inlinefrom transformers import pipelineclassifier = pipeline("text-classification", model="Sharpaxis/FIN_BERT_sentiment",top_k=None)def finance_sentiment_predictor(text):text = str(text)out = classifier(text)[0]scores = [sample['score'] for sample in out]labels = [sample['label'] for sample in out ]label_map = {'LABEL_0':"Negative",'LABEL_1':"Neutral",'LABEL_2':"Positive"}sentiments = [label_map[label] for label in labels]for i in range(len(scores)):print(f"{sentiments[i]} : {scores[i]}")print(f"Sentiment of text is {sentiments[np.argmax(scores)]}")fig = go.Figure(data=[go.Bar(x=sentiments,y=scores,marker=dict(color=["red", "blue", "green"]),width=0.3)])fig.update_layout(title="Sentiment Analysis Scores",xaxis_title="Sentiments",yaxis_title="Scores",template="plotly_dark")fig.show()
README.md+26