CoolFace
Apppublic

soorajshet5/Finbert

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

FinBERT Financial News Sentiment API

End-to-end NLP pipeline for Indian market sentiment analysis using fine-tuned FinBERT.

Results

MetricBase FinBERTFine-tunedImprovement
Accuracy53%89%+36%
Macro F10.320.85+0.53
Bearish F10.030.81+0.78
Bullish F10.110.83+0.72

Stack

  • Model: ProsusAI/FinBERT fine-tuned on financial Twitter sentiment
  • API: FastAPI with async batch inference
  • Vector Store: ChromaDB for semantic search
  • Training: HuggingFace Trainer + PyTorch

API Endpoints

  • POST /api/v1/analyze - single text sentiment
  • POST /api/v1/batch - up to 50 texts
  • GET /health - service health check

Quick Start

pip install -r requirements.txt uvicorn app.main:app --reload

Key Finding

Base FinBERT achieved 53% accuracy on Indian financial news due to domain mismatch. Fine-tuning improved macro F1 from 0.32 to 0.85.