orionweller commited on
Commit
c84c243
·
1 Parent(s): 25d2b51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -102,16 +102,16 @@ with col1:
102
  name_of_columns = ["Overview"] + sorted([int(item) for item in set(run1_pandas.qid.tolist())])
103
  checkboxes = [("Overview", st.checkbox("Overview", key=f"0overview"))]
104
  st.divider()
105
- for idx in range(len(name_of_columns)):
106
- if not idx:
107
  continue
108
  is_incorrect = False
109
  is_better_run1 = False
110
  is_better_run2 = False
111
 
112
- run1_score = results1[str(name_of_columns[idx])][metric_name] if idx else 1
113
  if run2_file is not None:
114
- run2_score = results2[str(name_of_columns[idx])][metric_name] if idx else 1
115
 
116
  if idx and run1_score == 0 or run2_score == 0:
117
  incorrect += 1
@@ -127,18 +127,18 @@ with col1:
127
  if not incorrect_only or is_incorrect:
128
  if not one_better_than_two or is_better_run1:
129
  if not two_better_than_one or is_better_run2:
130
- check = st.checkbox(str(name_of_columns[idx]), key=f"{idx}check")
131
  st.divider()
132
- checkboxes.append((name_of_columns[idx], check))
133
  else:
134
  if idx and run1_score == 0:
135
  incorrect += 1
136
  is_incorrect = True
137
 
138
  if not incorrect_only or is_incorrect:
139
- check = st.checkbox(str(name_of_columns[idx]), key=f"{idx}check")
140
  st.divider()
141
- checkboxes.append((name_of_columns[idx], check))
142
 
143
 
144
  with col2:
 
102
  name_of_columns = ["Overview"] + sorted([int(item) for item in set(run1_pandas.qid.tolist())])
103
  checkboxes = [("Overview", st.checkbox("Overview", key=f"0overview"))]
104
  st.divider()
105
+ for item in name_of_columns:
106
+ if item == "Overview":
107
  continue
108
  is_incorrect = False
109
  is_better_run1 = False
110
  is_better_run2 = False
111
 
112
+ run1_score = results1[str(item)][metric_name] if idx else 1
113
  if run2_file is not None:
114
+ run2_score = results2[str(item)][metric_name] if idx else 1
115
 
116
  if idx and run1_score == 0 or run2_score == 0:
117
  incorrect += 1
 
127
  if not incorrect_only or is_incorrect:
128
  if not one_better_than_two or is_better_run1:
129
  if not two_better_than_one or is_better_run2:
130
+ check = st.checkbox(str(item), key=f"{idx}check")
131
  st.divider()
132
+ checkboxes.append((item, check))
133
  else:
134
  if idx and run1_score == 0:
135
  incorrect += 1
136
  is_incorrect = True
137
 
138
  if not incorrect_only or is_incorrect:
139
+ check = st.checkbox(str(item), key=f"{idx}check")
140
  st.divider()
141
+ checkboxes.append((item, check))
142
 
143
 
144
  with col2: