orionweller commited on
Commit
b32ddfa
·
1 Parent(s): 67b90dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -103,24 +103,25 @@ with col1:
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
118
  is_incorrect = True
119
 
120
- if idx and run1_score > run2_score:
121
  is_better_run1_count += 1
122
  is_better_run1 = True
123
- elif idx and run2_score > run1_score:
124
  is_better_run2_count += 1
125
  is_better_run2 = True
126
 
@@ -131,7 +132,7 @@ with col1:
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
 
 
103
  checkboxes = [("Overview", st.checkbox("Overview", key=f"0overview"))]
104
  st.divider()
105
  for item in name_of_columns:
106
+ is_overview = item == "Overview"
107
+ if is_overview:
108
  continue
109
  is_incorrect = False
110
  is_better_run1 = False
111
  is_better_run2 = False
112
 
113
+ run1_score = results1[str(item)][metric_name] if not is_overview else 1
114
  if run2_file is not None:
115
+ run2_score = results2[str(item)][metric_name] if not is_overview else 1
116
 
117
+ if not is_overview and run1_score == 0 or run2_score == 0:
118
  incorrect += 1
119
  is_incorrect = True
120
 
121
+ if not is_overview and run1_score > run2_score:
122
  is_better_run1_count += 1
123
  is_better_run1 = True
124
+ elif not is_overview and run2_score > run1_score:
125
  is_better_run2_count += 1
126
  is_better_run2 = True
127
 
 
132
  st.divider()
133
  checkboxes.append((item, check))
134
  else:
135
+ if not is_overview and run1_score == 0:
136
  incorrect += 1
137
  is_incorrect = True
138