W A lightweight, fast, and accurate Sentiment Analysis Web App built with FastAPI and VADER NLP. This tool classifies user input into Positive, Negative, or Neutral sentiment using real-time analysis.
A lightweight, fast, and accurate Sentiment Analysis Web App built with FastAPI and VADER NLP. This tool classifies user input into Positive, Negative, or Neutral sentiment using real-time analysis.
/api/sentiment
endpointsentiment_analyzer/
app/
__init__.py
– Marks this folder as a Python packagemain.py
– FastAPI app logicsentiment.py
– Sentiment analysis logicschemas.py
– Request/response modelstemplates/
index.html
– Web frontend (Jinja2 template)requirements.txt
– List of dependenciesREADME.md
– Project documentation
git clone https://github.com/sujit-codezen/sentiment_analyzer.git cd sentiment-analyzer python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt uvicorn app.main:app --reload
curl -X POST http://localhost:8000/api/sentiment \ -H "Content-Type: application/json" \ -d '{"text": "I love FastAPI, it is amazing!"}' { "label": "Positive", "scores": { "neg": 0.0, "neu": 0.431, "pos": 0.569, "compound": 0.6486 } }