A powerful web application designed to scrape product reviews from various e-commerce platforms and perform sentiment analysis to gauge customer opinions using natural language processing (NLP) techniques.
- Project Overview
- Features
- Data Processing & Model Training
- Application Architecture
- Flask Integration & Deployment
- API Usage & Key Management
- Usage Instructions
- Setup Guide
- Technologies Used
- Future Improvements
EvaraFashion is an innovative application that enables users to scrape product reviews from multiple e-commerce sites and analyze the sentiments of these reviews. By leveraging advanced NLP algorithms, the app provides insights into customer satisfaction and product performance. This tool is beneficial for businesses aiming to improve their products and services based on real customer feedback.
- Review Scraping: Automatically collects product reviews from popular e-commerce platforms.
- Sentiment Analysis: Analyzes the sentiment of the scraped reviews, categorizing them as positive, negative, or neutral.
- Data Visualization: Displays sentiment distribution and trends through interactive charts and graphs.
- Keyword Extraction: Identifies and displays frequently mentioned keywords and phrases in reviews.
- Export Data: Allows users to export the scraped data and analysis results in CSV format for further analysis.
The application scrapes product reviews from popular e-commerce platforms using web scraping techniques. Libraries such as Beautiful Soup and Scrapy are utilized for efficient data extraction.
- The sentiment analysis is powered by a Natural Language Processing (NLP) model, built with TensorFlow and Keras.
- The model is trained on a large dataset of labeled reviews, employing techniques such as word embeddings and Recurrent Neural Networks (RNNs) for accurate sentiment classification.
The trained NLP model is stored as a TensorFlow SavedModel, allowing for easy integration into the web app for real-time predictions.
The application is built using a microservices architecture:
- Frontend: Developed with HTML5, CSS3, and Bootstrap 5 for a user-friendly interface.
- Backend: The Flask server handles scraping, sentiment analysis, and API requests.
- Machine Learning Service: Hosts the sentiment analysis model, providing predictions based on scraped data.
- Data Visualization: Utilizes libraries like Matplotlib and Plotly to present insights visually.
The Flask web app manages scraping requests, performs sentiment analysis, and serves visualizations. Key routes include:
/
: The homepage where users can initiate the scraping process./analyze
: Displays the sentiment analysis results and visualizations.
The app is hosted on Render, allowing users to access the scraping and analysis features through a responsive web interface.
The application may use third-party APIs for additional data or functionalities, managed through the .env
file for secure API key storage.
- Create a
.env
file in the root directory. - Add your API keys as needed:
API_KEY=your_api_key_here
-
Homepage:
- Enter the product URL from which you want to scrape reviews and click the "Scrape" button.
-
Sentiment Analysis:
- After scraping, the app will display the sentiment analysis results, including visualizations of sentiment distribution.
-
Export Data:
- Use the export functionality to download the scraped reviews and analysis results as a CSV file.
- Python 3.7+
- Flask
- TensorFlow, Keras
- Beautiful Soup, Scrapy
- Pandas, NumPy
- Matplotlib, Plotly
-
Clone the repository:
git clone https://github.com/yourusername/evara.git cd evara
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up the
.env
file with any necessary API keys. -
Run the Flask app:
python app.py
-
Visit the app at
http://127.0.0.1:5000
in your browser.
- Frontend: HTML5, CSS3, Bootstrap 5
- Backend: Flask
- Machine Learning: TensorFlow, Keras
- Web Scraping: Beautiful Soup, Scrapy
- Data Handling: Pandas, NumPy
- Visualization: Matplotlib, Plotly
- Environment Management: Python Dotenv for environment variables
- Support for More E-commerce Sites: Expanding the scraping capabilities to include additional platforms for a wider range of product reviews.
- Enhanced Sentiment Model: Incorporating advanced NLP techniques such as transformer models for improved sentiment analysis accuracy.
- User Accounts: Implement user authentication and personalized settings for saving favorite products and analyses.
- Real-time Monitoring: Adding features for real-time monitoring of product sentiment changes over time.