theodotus commited on
Commit
33ecfa0
1 Parent(s): 63a54d0

Fixed name dublicate

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. utils.py +1 -1
app.py CHANGED
@@ -27,7 +27,7 @@ def question_interface(question_state, answer):
27
  answer_ids = test.convert_to_answer_ids(question_state["responses"])
28
  best_id = test.select_best(answer_ids)
29
  radio = gr.Radio.update(choices = [], value = None)
30
- name = test.names[best_id]
31
  title = test.titles[best_id]
32
  image_path = test.get_photos_path(best_id)
33
  return None, name, radio, title, image_path
 
27
  answer_ids = test.convert_to_answer_ids(question_state["responses"])
28
  best_id = test.select_best(answer_ids)
29
  radio = gr.Radio.update(choices = [], value = None)
30
+ name = test.full_names[best_id]
31
  title = test.titles[best_id]
32
  image_path = test.get_photos_path(best_id)
33
  return None, name, radio, title, image_path
utils.py CHANGED
@@ -8,7 +8,7 @@ class Test:
8
  def __init__(self):
9
  self.data = self.read_test_data()
10
  self.descriptions = self.read_txt("images/descriptions.txt")
11
- self.names = self.read_txt("photos/names.txt")
12
  self.titles = self.read_txt("photos/titles.txt")
13
 
14
  def __len__(self):
 
8
  def __init__(self):
9
  self.data = self.read_test_data()
10
  self.descriptions = self.read_txt("images/descriptions.txt")
11
+ self.full_names = self.read_txt("photos/names.txt")
12
  self.titles = self.read_txt("photos/titles.txt")
13
 
14
  def __len__(self):