An advanced Streamlit application for analyzing fitness data from FIT and TCX files using AI-powered insights.
- Heart Rate Analysis: Interactive charts with training zone overlays
- Elevation Profiles: Detailed elevation changes throughout your workout
- GPS Route Mapping: Interactive maps showing your workout route
- Performance Metrics: Comprehensive workout statistics
- Detailed workout analysis using Google Vertex AI
- Training zone recommendations
- Performance improvement suggestions
- Recovery guidance
- Personalized coaching tips
- Modern, responsive interface
- Tabbed navigation for different data views
- Interactive charts and visualizations
- Chat interface for follow-up questions
- Export capabilities for data and chat history
- FIT Files: From Garmin, Polar, Suunto devices
- TCX Files: Training Center XML format
- Automatic file type detection
- Comprehensive data extraction
- Python 3.8+
- Google Cloud Account with Vertex AI enabled
- Valid fitness data files (FIT or TCX)
-
Clone the repository
git clone <your-repo-url> cd FIT_Chatbot_Streamlit
-
Create virtual environment
python -m venv 313 source 313/bin/activate # On Windows: 313\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
cp .env.example .env # Edit .env with your Google Cloud credentials -
Run the application
streamlit run main.py
Create a .env file with the following variables:
GOOGLE_CLOUD_PROJECT_ID=your-project-id
GOOGLE_CLOUD_REGION=us-central1
MODEL_NAME=gemini-pro- Create a Google Cloud Project
- Enable Vertex AI API
- Set up authentication (service account or application default credentials)
- Configure your project ID and region in the
.envfile
- Training zone visualization
- Average, maximum, and minimum heart rate
- Heart rate variability insights
- Zone distribution analysis
- Distance and duration tracking
- Pace and speed analysis
- Calorie burn calculations
- Power data analysis (if available)
- Interactive route mapping
- Elevation profile visualization
- Ascent and descent tracking
- Geographic insights
- Streamlit: Web application framework
- Plotly: Interactive data visualization
- Folium: GPS mapping and route visualization
- FitDecode: FIT file parsing
- TCXParser: TCX file parsing
- Google Vertex AI: AI-powered analysis
- Pandas/NumPy: Data processing
- Secure temporary file handling
- Automatic cleanup after processing
- Error handling for corrupted files
- Support for large file uploads
- Create visualization functions in the utility section
- Add new tabs in the main interface
- Include data validation and error handling
- Modify the AI prompt templates
- Add new analysis categories
- Implement custom metrics calculation
- Customize the Streamlit theme
- Add new sidebar options
- Implement additional export formats
ImportError: No module named 'X'
- Ensure all dependencies are installed:
pip install -r requirements.txt
Google Cloud Authentication Error
- Verify your credentials are properly configured
- Check your project ID and region settings
File Parsing Errors
- Ensure your files are valid FIT or TCX format
- Try with different files to isolate the issue
Visualization Not Loading
- Check browser console for JavaScript errors
- Try refreshing the page or restarting the app
- File Upload: Drag and drop or browse for FIT/TCX files
- Navigation: Use tabs to explore different aspects of your data
- AI Chat: Ask specific questions about your workout performance
- Export: Download analysis reports and chat history
- Settings: Use sidebar options to customize the display
- Multiple file comparison
- Historical trend analysis
- Training plan generation
- Social sharing features
- Mobile app version
- Integration with fitness APIs
- Advanced machine learning insights
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For questions and support, please open an issue in the GitHub repository.