theodotus commited on
Commit
c42a8bf
·
1 Parent(s): 10482e4

Added answers ids

Browse files
Files changed (1) hide show
  1. utils.py +9 -1
utils.py CHANGED
@@ -38,4 +38,12 @@ class Test:
38
 
39
  def get_image_path(self, idx):
40
  image_path = f"images/{idx}.jpg"
41
- return image_path
 
 
 
 
 
 
 
 
 
38
 
39
  def get_image_path(self, idx):
40
  image_path = f"images/{idx}.jpg"
41
+ return image_path
42
+
43
+ def convert_to_answer_ids(self, responces):
44
+ answer_ids = []
45
+ for idx, responce in enumerate(responces):
46
+ answers = self.get_answers(idx)
47
+ index = answers.index(responce)
48
+ answer_ids.append(index)
49
+ return answer_ids