This project is a Sentiment Analysis Web Application with Voice-to-Text functionality. Users can input text manually or via voice, which is then analyzed for sentiment (positive, neutral, or negative) using a pre-trained BERT model from Hugging Face.
- Voice Input: Click the microphone icon to speak, and your words will be transcribed to text.
- Sentiment Analysis: The backend uses a BERT-based model (
bertweet-base-sentiment-analysis
) from Hugging Face to analyze text sentiment. - User-Friendly Interface: A clean, modern design with gradient backgrounds and card-based layouts for a smooth user experience.
- React: Component-based, dynamic rendering.
- Web Speech API: Captures and converts spoken input to text.
- Flask: Manages requests and responses.
- Transformers Library (Hugging Face): Utilizes
bertweet-base-sentiment-analysis
for text sentiment analysis. - CORS: Handles cross-origin requests.
Ensure you have the following installed:
- Node.js and npm (for frontend)
- Python and pip (for backend)
- Git (for repository management)
-
Clone the repository:
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name
-
Backend Setup:
- Navigate to the backend folder:
cd backend
- Install Python dependencies:
pip install -r requirements.txt
- Start the Flask server:
python app.py
- Navigate to the backend folder:
-
Frontend Setup:
- Open a new terminal and navigate to the frontend folder:
cd frontend
- Install Node.js dependencies:
npm install
- Start the React development server:
npm start
- Open a new terminal and navigate to the frontend folder:
-
Run the Application:
- Open your browser and go to
http://localhost:5173
to access the app.
- Open your browser and go to