Spaces:
Sleeping
Sleeping
Commit
·
db9559c
1
Parent(s):
2de204c
Update app.py
Browse files
app.py
CHANGED
|
@@ -110,24 +110,18 @@ import pandas as pd
|
|
| 110 |
import joblib
|
| 111 |
from collections import OrderedDict
|
| 112 |
|
| 113 |
-
# Load models
|
| 114 |
food_model = joblib.load("goal_classifier.pkl")
|
| 115 |
exercise_model = joblib.load("exercise_classifier.pkl")
|
| 116 |
-
# encoders = joblib.load("encoders.pkl")
|
| 117 |
-
le_gender = joblib.load['gender']
|
| 118 |
-
le_workout = joblib.load['workout']
|
| 119 |
-
le_goal = joblib.load['goal']
|
| 120 |
-
le_exercise = joblib.load['exercise']
|
| 121 |
-
preprocessor = joblib.load['preprocessor']
|
| 122 |
|
| 123 |
-
df = pd.read_csv("fitness_meal_plan_with_exercises.csv")
|
| 124 |
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
|
|
|
| 131 |
|
| 132 |
def calculate_bmi(weight_kg, height_cm):
|
| 133 |
return weight_kg / ((height_cm / 100) ** 2)
|
|
@@ -218,4 +212,7 @@ if __name__ == "__main__":
|
|
| 218 |
|
| 219 |
|
| 220 |
|
|
|
|
|
|
|
|
|
|
| 221 |
|
|
|
|
| 110 |
import joblib
|
| 111 |
from collections import OrderedDict
|
| 112 |
|
| 113 |
+
# Load models
|
| 114 |
food_model = joblib.load("goal_classifier.pkl")
|
| 115 |
exercise_model = joblib.load("exercise_classifier.pkl")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
|
|
|
|
| 117 |
|
| 118 |
+
le_gender = joblib.load['gender.pkl']
|
| 119 |
+
le_workout = joblib.load['workout.pkl']
|
| 120 |
+
le_goal = joblib.load['goal.pkl']
|
| 121 |
+
le_exercise = joblib.load['exercise.pkl']
|
| 122 |
+
preprocessor = joblib.load['preprocessor.pkl']
|
| 123 |
+
|
| 124 |
+
df = pd.read_csv("monthly_fitness_dataset_user200.csv")
|
| 125 |
|
| 126 |
def calculate_bmi(weight_kg, height_cm):
|
| 127 |
return weight_kg / ((height_cm / 100) ** 2)
|
|
|
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
|
| 218 |
|