installation_guide - SubhaNAG2001/sentiment-analysis GitHub Wiki
Installation Guide
This guide will walk you through the process of setting up the Sentiment Analysis Web Application on your local machine.
Prerequisites
Before you begin, ensure you have the following installed:
- Python 3.6 or higher
- pip (Python package manager)
- Git (optional, for cloning the repository)
Step 1: Clone the Repository
git clone https://github.com/yourusername/sentiment-analysis.git
cd sentiment-analysis
Alternatively, you can download the ZIP file from the GitHub repository and extract it.
Step 2: Install Required Packages
Install all the required Python packages using pip:
pip install flask waitress nltk joblib scikit-learn
If you prefer to use a virtual environment (recommended):
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install packages
pip install flask waitress nltk joblib scikit-learn
Step 3: Download NLTK Resources
The application requires NLTK resources for text preprocessing. You can download them by running:
# Run Python in interactive mode
python
# In the Python interpreter
import nltk
nltk.download('stopwords')
nltk.download('punkt')
exit()
Alternatively, the application is configured to download these resources automatically on first run.
Step 4: Verify Installation
To verify that everything is installed correctly, run the application in development mode:
python app.py
You should see output indicating that the Flask development server has started, and the application is running on http://127.0.0.1:5000/
.
Troubleshooting
If you encounter any issues during installation, please check the Troubleshooting page or open an issue on GitHub.