A lightweight web application for analyzing user feedback sentiments as Positive, Negative, or Neutral, built using ReactJS (frontend) and Flask (backend) with Hugging Face’s AI models powered by TensorFlow.
- User-Friendly Interface: Submit feedback easily through a modern React-based UI.
- AI-Powered Sentiment Analysis: Leverages Hugging Face’s
distilbert-base-uncased-finetuned-sst-2-english
model. - Fast Development: Built with Vite for efficient frontend development.
- Scalable Backend: Flask API with TensorFlow-based inference.
- Node.js 14.x or higher
- Python 3.7 or higher
git clone [email protected]:allanninal/sentiment-analysis-feedback-app.git
cd sentiment-analysis-feedback-app
-
Navigate to the
backend
directory:cd backend
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Start the Flask server:
python app.py # or use python3.11 app.py, python3.12 app.py, etc. depending on your Python version
-
Navigate to the
frontend
directory:cd frontend
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
- Run Both Servers: Ensure the Flask backend and React frontend servers are running.
- Access the App: Open the frontend in your browser at:
http://localhost:5173
- Submit Feedback: Enter text feedback in the input box and analyze its sentiment.
- Positive: "This app is amazing! I love it."
- Negative: "This app is terrible. It keeps crashing."
- Neutral: "This is an app."
- Frontend: ReactJS, Vite
- Backend: Flask
- AI Model: Hugging Face Transformers
- Framework: TensorFlow
sentiment-analysis-feedback-app/
├── backend/ # Flask backend
│ ├── app.py # Main Flask application
│ ├── requirements.txt # Python dependencies
├── frontend/ # ReactJS frontend
│ ├── src/ # Source code
├── README.md # Project documentation
├── LICENSE # MIT License file
└── .gitignore # Ignored files/folders for Git
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with detailed changes.
This project is licensed under the MIT License. See the LICENSE
file for details.
If you find this project helpful, consider supporting me:
Buy Me a Coffee ☕ Support me on Ko-fi