Rammohan0504 commited on
Commit
99ab13b
·
verified ·
1 Parent(s): 4c80229

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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 if the model was trained with column names
245
- features_df = pd.DataFrame([features], columns=["feature1", "feature2", "feature3"])
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 = {}