philippds commited on
Commit
4ac1e56
·
verified ·
1 Parent(s): 3be1481

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -244,19 +244,22 @@ with block:
244
  # gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
245
  # ENVIRONMENT TABS
246
  with gr.Tabs() as tabs: # elem_classes="tab-buttons"
247
- for i in range(0, len(hivex_envs)):
248
- hivex_env = hivex_envs[i]
249
  with gr.Tab(f"{hivex_env['title']}") as env_tabs:
250
  # TASK TABS
251
  for task_id in range(0, hivex_env["task_count"]):
252
  task_title = convert_to_title_case(get_task(hivex_env["hivex_env"], task_id, path_))
253
  with gr.TabItem(f"Task {task_id}: {task_title}"):
254
  with gr.Row():
 
 
 
255
  gr_dataframe = gr.components.Dataframe(
256
- value=get_data(hivex_env["hivex_env"], task_id, path_),
257
  headers=["User", "Model"],
258
  datatype=["markdown", "markdown"],
259
- row_count='dynamic'
260
  )
261
 
262
 
 
244
  # gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
245
  # ENVIRONMENT TABS
246
  with gr.Tabs() as tabs: # elem_classes="tab-buttons"
247
+ for env_index in range(0, len(hivex_envs)):
248
+ hivex_env = hivex_envs[env_index]
249
  with gr.Tab(f"{hivex_env['title']}") as env_tabs:
250
  # TASK TABS
251
  for task_id in range(0, hivex_env["task_count"]):
252
  task_title = convert_to_title_case(get_task(hivex_env["hivex_env"], task_id, path_))
253
  with gr.TabItem(f"Task {task_id}: {task_title}"):
254
  with gr.Row():
255
+ data = get_data(hivex_env["hivex_env"], task_id, path_)
256
+ row_count = len(data) # Number of rows in the data
257
+
258
  gr_dataframe = gr.components.Dataframe(
259
+ value=data,
260
  headers=["User", "Model"],
261
  datatype=["markdown", "markdown"],
262
+ row_count=(row_count, 'fixed') # Set to the exact number of rows in the data
263
  )
264
 
265