Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,8 +52,7 @@ try:
|
|
52 |
spo2_model = joblib.load("spo2_model_simulated.pkl")
|
53 |
hr_model = joblib.load("heart_rate_model.pkl")
|
54 |
except FileNotFoundError:
|
55 |
-
print(
|
56 |
-
"Error: One or more .pkl model files are missing. Please upload them.")
|
57 |
exit(1)
|
58 |
|
59 |
models = {
|
@@ -241,8 +240,8 @@ def analyze_face(input_data):
|
|
241 |
0].landmark # Fixed: Use integer index
|
242 |
features = extract_features(frame_rgb, landmarks)
|
243 |
|
244 |
-
# Convert features to pandas DataFrame
|
245 |
-
features_df = pd.DataFrame([features], columns=["
|
246 |
|
247 |
test_values = {}
|
248 |
r2_scores = {}
|
|
|
52 |
spo2_model = joblib.load("spo2_model_simulated.pkl")
|
53 |
hr_model = joblib.load("heart_rate_model.pkl")
|
54 |
except FileNotFoundError:
|
55 |
+
print("Error: One or more .pkl model files are missing. Please upload them.")
|
|
|
56 |
exit(1)
|
57 |
|
58 |
models = {
|
|
|
240 |
0].landmark # Fixed: Use integer index
|
241 |
features = extract_features(frame_rgb, landmarks)
|
242 |
|
243 |
+
# Convert features to pandas DataFrame with correct column names
|
244 |
+
features_df = pd.DataFrame([features], columns=["%Red Pixel", "%Green Pixel", "%Blue Pixel"])
|
245 |
|
246 |
test_values = {}
|
247 |
r2_scores = {}
|