prithivMLmods commited on
Commit
940320f
·
verified ·
1 Parent(s): 243f63f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -0
README.md CHANGED
@@ -75,6 +75,23 @@ The model categorizes images into 22 workout classes:
75
  - **Class 20:** "tricep dips"
76
  - **Class 21:** "tricep pushdown"
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  # **Run with Transformers🤗**
79
 
80
  ```python
 
75
  - **Class 20:** "tricep dips"
76
  - **Class 21:** "tricep pushdown"
77
 
78
+ ```py
79
+ from datasets import load_dataset
80
+
81
+ # Load the dataset
82
+ dataset = load_dataset("YOUR-DATASET-HERE")
83
+
84
+ # Extract unique labels
85
+ labels = dataset["train"].features["label"].names
86
+
87
+ # Create id2label mapping
88
+ id2label = {str(i): label for i, label in enumerate(labels)}
89
+
90
+ # Print the mapping
91
+ print(id2label)
92
+ ```
93
+
94
+
95
  # **Run with Transformers🤗**
96
 
97
  ```python