Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,3 +10,55 @@ pinned: false
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
+
# SmartFit AI - Personalized Workout Engine
|
| 14 |
+
### A Machine Learning & Rule-Based Logic Application
|
| 15 |
+
|
| 16 |
+
**SmartFit AI** is an intelligent fitness planner designed to create highly personalized workout routines. Unlike standard apps that give generic advice, SmartFit acts as a Digital Personal Trainer that adapts to your:
|
| 17 |
+
* **Biomechanics:** Age, Gender, Weight, Height.
|
| 18 |
+
* **Constraints:** Specific injuries (Knee, Back, Shoulder, etc.).
|
| 19 |
+
* **Equipment:** Real-time filtering based on what you have (Gym, Home Dumbbells, or Bodyweight).
|
| 20 |
+
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
## How it Works (The IO Pipeline)
|
| 24 |
+
|
| 25 |
+
The system uses a unique Hybrid Pipeline combining Machine Learning with a Strict Logic Engine:
|
| 26 |
+
|
| 27 |
+
1. **INPUT:** User enters physical stats, goals, and injury data.
|
| 28 |
+
2. **MODEL (Classification):** A trained Random Forest Classifier analyzes the profile against 10,000 synthetic use-cases to determine the best Strategy Category (e.g., "High Volume Hypertrophy" vs. "Low Impact Stability").
|
| 29 |
+
3. **LOGIC ENGINE (The Calculator):** A Python-based expert system takes the strategy and:
|
| 30 |
+
* **Filters:** Removes any exercise dangerous for the specific injury.
|
| 31 |
+
* **Calculates:** Computes exact target weights (kg) based on user mass and level.
|
| 32 |
+
* **Randomizes:** Selects exercises dynamically to ensure variety.
|
| 33 |
+
4. **OUTPUT:** A complete, step-by-step custom plan with warm-ups and finishers.
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## Data & Model Analysis
|
| 38 |
+
|
| 39 |
+
### 1. The Dataset
|
| 40 |
+
I generated a synthetic dataset of 10,000 user profiles to train the model. This allowed me to simulate edge cases (like an elderly person with a shoulder injury) that are hard to find in public datasets.
|
| 41 |
+
|
| 42 |
+
**Data Distribution & Analysis:**
|
| 43 |
+

|
| 44 |
+
*(Above: Analysis of the dataset features and target variable distribution)*
|
| 45 |
+
|
| 46 |
+
### 2. Embeddings & Clustering
|
| 47 |
+
Using NLP Embeddings, I analyzed the semantic similarity between different user profiles. This visualization proves that the model correctly identifies distinct "clusters" of users (e.g., Bodybuilders vs. Rehab patients).
|
| 48 |
+
|
| 49 |
+
**User Segmentation (Embeddings):**
|
| 50 |
+

|
| 51 |
+
*(Above: Visualizing user groups based on profile similarity)*
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## Tech Stack
|
| 56 |
+
* **Model:** Scikit-Learn (Random Forest)
|
| 57 |
+
* **Interface:** Gradio (Web UI)
|
| 58 |
+
* **Logic:** Python Custom Algorithms
|
| 59 |
+
* **Deployment:** Hugging Face Spaces
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
### Disclaimer
|
| 64 |
+
This is a final project for an AI course. While the logic is based on fitness principles, always consult a doctor before starting a new training program.
|