Spaces:
Runtime error
Runtime error
Commit
β’
7d04350
1
Parent(s):
4bda9b2
Update app.py
Browse files
app.py
CHANGED
@@ -332,16 +332,17 @@ with block:
|
|
332 |
search_btn = gr.Button("Search my models π")
|
333 |
reset_btn = gr.Button("Clear my search")
|
334 |
env = gr.Variable(rl_env["rl_env"])
|
|
|
335 |
with gr.Row():
|
336 |
-
gr_dataframe = gr.components.Dataframe(value=get_data(rl_env["rl_env"],
|
337 |
|
338 |
with gr.Row():
|
339 |
#gr_search_dataframe = gr.components.Dataframe(headers=["Ranking π", "User π€", "Model id π€", "Results", "Mean Reward", "Std Reward"], datatype=["number", "markdown", "markdown", "number", "number", "number"], visible=False)
|
340 |
-
search_btn.click(fn=filter_data, inputs=[env,
|
341 |
|
342 |
with gr.Row():
|
343 |
-
search_btn.click(fn=filter_data, inputs=[env,
|
344 |
-
reset_btn.click(fn=get_data, inputs=[env,
|
345 |
|
346 |
scheduler = BackgroundScheduler()
|
347 |
# Refresh every hour
|
|
|
332 |
search_btn = gr.Button("Search my models π")
|
333 |
reset_btn = gr.Button("Clear my search")
|
334 |
env = gr.Variable(rl_env["rl_env"])
|
335 |
+
path = gr.Variable(path_)
|
336 |
with gr.Row():
|
337 |
+
gr_dataframe = gr.components.Dataframe(value=get_data(rl_env["rl_env"], path), headers=["Ranking π", "User π€", "Model id π€", "Results", "Mean Reward", "Std Reward"], datatype=["number", "markdown", "markdown", "number", "number", "number"], row_count=(100, 'fixed'))
|
338 |
|
339 |
with gr.Row():
|
340 |
#gr_search_dataframe = gr.components.Dataframe(headers=["Ranking π", "User π€", "Model id π€", "Results", "Mean Reward", "Std Reward"], datatype=["number", "markdown", "markdown", "number", "number", "number"], visible=False)
|
341 |
+
search_btn.click(fn=filter_data, inputs=[env, path, user_id], outputs=gr_dataframe, api_name="filter_data")
|
342 |
|
343 |
with gr.Row():
|
344 |
+
search_btn.click(fn=filter_data, inputs=[env, path, user_id], outputs=gr_dataframe, api_name="filter_data")
|
345 |
+
reset_btn.click(fn=get_data, inputs=[env, path], outputs=gr_dataframe, api_name="get_data")
|
346 |
|
347 |
scheduler = BackgroundScheduler()
|
348 |
# Refresh every hour
|