This is a web application built using Next.js and React that allows users to submit reviews, analyze their sentiment, and vote on them. The sentiment analysis is performed using the Hugging Face sentiment analysis model through an API route. Users can upvote or downvote reviews based on their preference.
- User-friendly interface for submitting reviews and analyzing their sentiment.
- Real-time sentiment analysis using the Hugging Face sentiment analysis model.
- Review voting system to express approval or disapproval.
- Toggle review input to declutter the interface.
- Dynamic sorting of reviews based on vote count.
- Responsive design for different screen sizes.
- Clone the repository or download the ZIP file.
Navigate to the project directory.
git clone https://github.com/RajGM/ethicaAi.git
Install the dependencies.
cd sentiment-analysis-app
Install the dependencies.
npm install
Add API keys to .env.local file
Run the development server.
npm run dev
Open your web browser and visit http://localhost:3000 to access the application.
Enter a review in the textarea, click "Analyze" to determine its sentiment, and vote on reviews.
Welcome to the Sentiment Analysis and Review Voting App! This web application is built using Next.js and React, allowing users to submit reviews, analyze their sentiment, and vote on them. The sentiment analysis is powered by the Hugging Face sentiment analysis model through an API route.
-
Open your web browser and visit
http://localhost:3000
to access the application. -
Enter a review in the provided textarea.
-
Click the "Analyze" button to determine the sentiment of the review.
-
You can also vote on existing reviews by using the upvote and downvote buttons.
The sentiment analysis functionality is provided by an API route located at /pages/api/analyze.js
. This route handles the sentiment analysis using the Hugging Face sentiment analysis model.
For more detailed information about the API route's functionality, refer to the code comments in the analyze.js
file.
The app leverages the following technologies:
Contributions are highly appreciated! If you come across any issues or have suggestions for improvements, please don't hesitate to:
- Create a pull request
- Submit an issue
This project is licensed under the MIT License.