erax commited on
Commit
950f45e
·
verified ·
1 Parent(s): 2709008

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -37,9 +37,7 @@ def yolov8_inference(
37
  anchor = h if h > w else w
38
 
39
  # Create the dictionary by filtering list1 and list2 based on list3
40
- selected_classes = {key: value for key, value in zip(["anus", "make_love", "nipple", "penis", "vagina"],\
41
- [0, 1, 2, 3, 4]) \
42
- if key in selected_labels_list}
43
 
44
  # print(filtered_mapping)
45
  # selected_classes = [0, 1, 2, 3, 4] # all classes
 
37
  anchor = h if h > w else w
38
 
39
  # Create the dictionary by filtering list1 and list2 based on list3
40
+ selected_classes = [[0, 1, 2, 3, 4][["anus", "make_love", "nipple", "penis", "vagina"].index(item)] for item in selected_labels_list]
 
 
41
 
42
  # print(filtered_mapping)
43
  # selected_classes = [0, 1, 2, 3, 4] # all classes