ynhe commited on
Commit
74cc2fe
1 Parent(s): 119b58d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -96,10 +96,10 @@ def get_final_score(df, selected_columns):
96
  quality_score = normalize_df[QUALITY_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in QUALITY_LIST])
97
  semantic_score = normalize_df[SEMANTIC_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in SEMANTIC_LIST ])
98
  final_score = (quality_score * QUALITY_WEIGHT + semantic_score * SEMANTIC_WEIGHT) / (QUALITY_WEIGHT + SEMANTIC_WEIGHT)
99
- if 'Overall Score' in df:
100
- df['Overall Score'] = final_score
101
  else:
102
- df.insert(1, 'Overall Score', final_score)
103
  if 'Semantic Score' in df:
104
  df['Semantic Score'] = semantic_score
105
  else:
@@ -198,9 +198,9 @@ with block:
198
  )
199
  with gr.Row():
200
  with gr.Column(scale=0.2):
201
- choosen_q = gr.Button("Select ALL Quality")
202
- choosen_s = gr.Button("Select ALL Semantic")
203
- enable_b = gr.Button("Select All")
204
  disable_b = gr.Button("Deselect All")
205
 
206
  with gr.Column(scale=0.8):
@@ -223,7 +223,7 @@ with block:
223
 
224
  choosen_q.click(choose_all_quailty, inputs=None, outputs=[checkbox_group]).then(fn=on_filter_model_size_method_change, inputs=[ checkbox_group], outputs=data_component)
225
  choosen_s.click(choose_all_semantic, inputs=None, outputs=[checkbox_group]).then(fn=on_filter_model_size_method_change, inputs=[ checkbox_group], outputs=data_component)
226
- enable_b.click(enable_all, inputs=None, outputs=[checkbox_group]).then(fn=on_filter_model_size_method_change, inputs=[ checkbox_group], outputs=data_component)
227
  disable_b.click(disable_all, inputs=None, outputs=[checkbox_group]).then(fn=on_filter_model_size_method_change, inputs=[ checkbox_group], outputs=data_component)
228
  checkbox_group.change(fn=on_filter_model_size_method_change, inputs=[ checkbox_group], outputs=data_component)
229
 
 
96
  quality_score = normalize_df[QUALITY_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in QUALITY_LIST])
97
  semantic_score = normalize_df[SEMANTIC_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in SEMANTIC_LIST ])
98
  final_score = (quality_score * QUALITY_WEIGHT + semantic_score * SEMANTIC_WEIGHT) / (QUALITY_WEIGHT + SEMANTIC_WEIGHT)
99
+ if 'Total Score' in df:
100
+ df['Total Score'] = final_score
101
  else:
102
+ df.insert(1, 'Total Score', final_score)
103
  if 'Semantic Score' in df:
104
  df['Semantic Score'] = semantic_score
105
  else:
 
198
  )
199
  with gr.Row():
200
  with gr.Column(scale=0.2):
201
+ choosen_q = gr.Button("Select Quality Dimensions")
202
+ choosen_s = gr.Button("Select Video-Text Consistency Dimensions")
203
+ # enable_b = gr.Button("Select All")
204
  disable_b = gr.Button("Deselect All")
205
 
206
  with gr.Column(scale=0.8):
 
223
 
224
  choosen_q.click(choose_all_quailty, inputs=None, outputs=[checkbox_group]).then(fn=on_filter_model_size_method_change, inputs=[ checkbox_group], outputs=data_component)
225
  choosen_s.click(choose_all_semantic, inputs=None, outputs=[checkbox_group]).then(fn=on_filter_model_size_method_change, inputs=[ checkbox_group], outputs=data_component)
226
+ # enable_b.click(enable_all, inputs=None, outputs=[checkbox_group]).then(fn=on_filter_model_size_method_change, inputs=[ checkbox_group], outputs=data_component)
227
  disable_b.click(disable_all, inputs=None, outputs=[checkbox_group]).then(fn=on_filter_model_size_method_change, inputs=[ checkbox_group], outputs=data_component)
228
  checkbox_group.change(fn=on_filter_model_size_method_change, inputs=[ checkbox_group], outputs=data_component)
229