How mikatrow/fravil works
Fravil is a micro-workout recommendation app: a user sets time, available space, and mood; the web page sends these inputs to a Flask prediction endpoint and presents the recommended exercise with explanatory text and learning links. The endpoint validates and encodes the request, predicts with a trained classifier, and decodes the exercise label. A separate training script builds the classifier and encoders from a dataset. The README documents these capabilities; the graph follows the sampled runtime code and documented training flow.
Main entry points: page.tsx Recommendation page · host_flask.py Prediction endpoint · train_and_predict_micro_exercises.py Model training · mood_encoder.pkl Mood encoder
Components 10
Web experience
- Recommendation page
src/app/page.tsx
Recommendation service
- Prediction endpoint
host_flask.py
Model lifecycle
- Mood encoder
model/mood_encoder.pkl - Exercise encoder
model/exercise_encoder.pkl - Exercise classifier
model/exercise_rf_model.pkl - Model training
model/train_and_predict_micro_exercises.py - Exercise dataset
model/micro_exercises_dataset_grouped.csv
Exercise guidance
- Exercise descriptions
exercise_info.ts
Other components
- User
- Learning resources
Connections 13
- User → Recommendation page: sets inputs
- Recommendation page → Prediction endpoint: posts inputs
- Prediction endpoint → Mood encoder: encodes mood
- Prediction endpoint → Exercise classifier: predicts exercise
- Prediction endpoint → Exercise encoder: decodes label
- Prediction endpoint → Recommendation page: returns exercise
- Recommendation page → Exercise descriptions: looks up details
- Recommendation page → User: shows recommendation
- Recommendation page → Learning resources: links to guidance
- Model training → Exercise dataset: loads examples
- Model training → Exercise classifier: saves classifier
- Model training → Mood encoder: saves encoder
- Model training → Exercise encoder: saves encoder