audrey06100 commited on
Commit
3166abf
·
1 Parent(s): 251d442
Files changed (2) hide show
  1. app.py +1 -1
  2. app_utils.py +2 -2
app.py CHANGED
@@ -251,7 +251,7 @@ with gr.Blocks() as demo:
251
  scale=2)
252
  fillmode_btn = gr.Button("OK", visible=False, scale=1)
253
  chkbox_group = gr.CheckboxGroup(elem_id="chkbox-group", visible=False)
254
- # step4 : mapping result
255
  out_json_file = gr.File(label="Mapping result", visible=False)
256
  res_md = gr.Markdown("""
257
  (Download this file if you plan to run the models using the source code.)
 
251
  scale=2)
252
  fillmode_btn = gr.Button("OK", visible=False, scale=1)
253
  chkbox_group = gr.CheckboxGroup(elem_id="chkbox-group", visible=False)
254
+ # step4 : mapping results
255
  out_json_file = gr.File(label="Mapping result", visible=False)
256
  res_md = gr.Markdown("""
257
  (Download this file if you plan to run the models using the source code.)
app_utils.py CHANGED
@@ -305,7 +305,7 @@ def optimal_mapping(channel_info):
305
  # by minimizing the total distances between their positions.
306
  row_idx, col_idx = linear_sum_assignment(cost_matrix)
307
 
308
- # store the mapping result
309
  new_idx = [[]]*30
310
  fill_flags = [True]*30
311
  for i in range(30):
@@ -346,7 +346,7 @@ def mapping_result(stage1_info, stage2_info, channel_info, filename):
346
  new_mapping_data, channel_info = optimal_mapping(channel_info)
347
  stage1_info["mappingData"] += [new_mapping_data]
348
 
349
- # save the mapping result
350
  new_dict = {
351
  #"templateOrder" : channel_info["templateOrder"],
352
  #"inputOrder" : channel_info["inputOrder"],
 
305
  # by minimizing the total distances between their positions.
306
  row_idx, col_idx = linear_sum_assignment(cost_matrix)
307
 
308
+ # store the mapping results
309
  new_idx = [[]]*30
310
  fill_flags = [True]*30
311
  for i in range(30):
 
346
  new_mapping_data, channel_info = optimal_mapping(channel_info)
347
  stage1_info["mappingData"] += [new_mapping_data]
348
 
349
+ # save the mapping results
350
  new_dict = {
351
  #"templateOrder" : channel_info["templateOrder"],
352
  #"inputOrder" : channel_info["inputOrder"],