Spaces:
Sleeping
Sleeping
Added answers ids
Browse files
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
|