Flask backend for the SleepWise health prediction application.
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
Predicts sleep quality and provides health suggestions based on user metrics.
Request Body:
{
"heartRate": 70,
"steps": 8000,
"activityLevel": "Moderate"
}
Response:
{
"sleepQuality": "Good",
"healthScore": 75.5,
"suggestions": [
"Strong metrics with room for fine-tuning",
"Heart Rate: 70 BPM (Good)",
"Steps: 8,000 (Good)",
"Consider timing of exercise relative to sleep",
"Monitor caffeine intake timing"
]
}
This backend is configured for deployment on Render.com using the following files:
requirements.txt
: Python dependenciesProcfile
: Command to run the applicationrender.yaml
: Render configuration