GarimaPuri01 commited on
Commit
2dbb7b9
·
verified ·
1 Parent(s): a94bd5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,10 +15,10 @@ mp_drawing = mp.solutions.drawing_utils
15
  # Load the Hugging Face model and tokenizer
16
  model_name = "dima806/yoga_pose_image_classification"
17
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
18
- tokenizer = AutoTokenizer.from_pretrained(model_name)
19
 
20
  # Yoga Pose Classification Function using Hugging Face model
21
- def classify_pose(landmarks):
 
22
  # Prepare input for the model
23
  landmark_list = [landmark.x for landmark in landmarks] + [landmark.y for landmark in landmarks] + [landmark.z for landmark in landmarks]
24
  inputs = tokenizer(landmark_list, return_tensors="pt")
 
15
  # Load the Hugging Face model and tokenizer
16
  model_name = "dima806/yoga_pose_image_classification"
17
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
 
18
 
19
  # Yoga Pose Classification Function using Hugging Face model
20
+
21
+ def classify_pose(landmarks):
22
  # Prepare input for the model
23
  landmark_list = [landmark.x for landmark in landmarks] + [landmark.y for landmark in landmarks] + [landmark.z for landmark in landmarks]
24
  inputs = tokenizer(landmark_list, return_tensors="pt")