Update app.py
Browse files
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
|
248 |
-
hivex_env = hivex_envs[
|
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=
|
257 |
headers=["User", "Model"],
|
258 |
datatype=["markdown", "markdown"],
|
259 |
-
row_count='
|
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 |
|