thearn commited on
Commit
828dadd
·
1 Parent(s): 59b2bb7

adjusted headers

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -71,10 +71,14 @@ with gr.Blocks(title="Maximum Submatrix Sum Calculator") as app:
71
  random_matrix_btn = gr.Button("Generate New Random Matrix")
72
 
73
  # Use a dataframe component for the matrix input/output
 
 
 
74
  matrix_display = gr.Dataframe(
75
- value=generate_random_matrix(),
76
  interactive=True,
77
- label="Matrix (cells in max submatrix will be highlighted in green)"
 
78
  )
79
 
80
  highlighted_matrix = gr.HTML(label="Highlighted Matrix")
 
71
  random_matrix_btn = gr.Button("Generate New Random Matrix")
72
 
73
  # Use a dataframe component for the matrix input/output
74
+ # Generate initial matrix and headers
75
+ initial_matrix = generate_random_matrix()
76
+ empty_headers = [""] * initial_matrix.shape[1]
77
  matrix_display = gr.Dataframe(
78
+ value=initial_matrix,
79
  interactive=True,
80
+ label="Matrix (cells in max submatrix will be highlighted in green)",
81
+ headers=empty_headers
82
  )
83
 
84
  highlighted_matrix = gr.HTML(label="Highlighted Matrix")