ThomasSimonini HF staff commited on
Commit
7d04350
β€’
1 Parent(s): 4bda9b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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"], path_), headers=["Ranking πŸ†", "User πŸ€—", "Model id πŸ€–", "Results", "Mean Reward", "Std Reward"], datatype=["number", "markdown", "markdown", "number", "number", "number"], row_count=(100, 'fixed'))
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, path_, user_id], outputs=gr_dataframe, api_name="filter_data")
341
 
342
  with gr.Row():
343
- search_btn.click(fn=filter_data, inputs=[env, path_, user_id], outputs=gr_dataframe, api_name="filter_data")
344
- reset_btn.click(fn=get_data, inputs=[env, path_], outputs=gr_dataframe, api_name="get_data")
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