This project is a web application that predicts stress levels based on various input factors. It uses a machine learning model to make predictions and provides a user-friendly interface for input and result display.
- User input form for various stress-related factors
- Machine learning model (Decision Tree Classifier) for stress level prediction
- Responsive web design with custom styling
- Input validation to ensure data integrity
- Error handling for invalid inputs
- Python
- Flask
- scikit-learn
- pandas
- numpy
- HTML/CSS
- JavaScript
app.py
: Main Flask application file containing the server-side logic and machine learning modeltemplates/
: Directory containing HTML templateslogin.html
: Input form for user dataresult.html
: Displays the predicted stress levelerror.html
: Error page for invalid inputs
static/
: Directory for static filesstyles.css
: Custom CSS styles for the application
StressLevelDataset.csv
: Dataset used for training the model (not included in the repository)
-
Clone the repository:
https://github.com/venky-1710/stress-level-predection.git
-
Install the required dependencies:
pip install flask pandas numpy scikit-learn
-
Ensure you have the
StressLevelDataset.csv
file in the project root directory. -
Run the Flask application:
python app.py
-
Open a web browser and navigate to
http://localhost:5000
to use the application.
- Fill in the form with your stress-related factors. Each field has a specified range of values.
- Click the "Submit" button to get your predicted stress level.
- The result page will display your predicted stress level based on the input factors.
- Implement user authentication and data storage
- Add more detailed explanations for each input factor
- Incorporate additional machine learning models for comparison
- Develop a feature to track stress levels over time
Contributions to improve the project are welcome. Please feel free to fork the repository and submit pull requests.
This project is open source and available under the MIT License.