ercanburak commited on
Commit
3df38d3
1 Parent(s): fae6ebf

scale font size for larger resolution data

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -61,6 +61,8 @@ def retrieve_results(selected_dataset, selected_sequence, selected_models, selec
61
 
62
  w = selected_dataset["width"]
63
  h = selected_dataset["height"]
 
 
64
  input_filter_parts = []
65
  xstack_input_parts = []
66
  layout_parts = []
@@ -68,7 +70,7 @@ def retrieve_results(selected_dataset, selected_sequence, selected_models, selec
68
  row_heights = [""]*num_rows
69
  gt_viz_indices = []
70
  if len(model_viz) > 1:
71
- left_pad = (font_size*0.7)*max([len(viz['display_name']) for viz in model_viz[1:]]) + padding*2
72
  else:
73
  left_pad = 0
74
 
 
61
 
62
  w = selected_dataset["width"]
63
  h = selected_dataset["height"]
64
+ font_size_scale = w / 240.0
65
+ font_size = int(font_size * font_size_scale)
66
  input_filter_parts = []
67
  xstack_input_parts = []
68
  layout_parts = []
 
70
  row_heights = [""]*num_rows
71
  gt_viz_indices = []
72
  if len(model_viz) > 1:
73
+ left_pad = int(font_size*0.8) * max([len(viz['display_name']) for viz in model_viz[1:]]) + padding*2
74
  else:
75
  left_pad = 0
76