ThomasSimonini HF staff commited on
Commit
58a3f61
β€’
1 Parent(s): 88d91f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -329,6 +329,7 @@ with block:
329
  with gr.Row():
330
  user_id = gr.Textbox(label= "Your user id")
331
  search_btn = gr.Button("Search my models πŸ”Ž")
 
332
  env = gr.Variable(rl_env["rl_env"])
333
  grpath = gr.Variable(path_)
334
  with gr.Row():
@@ -337,6 +338,10 @@ with block:
337
  with gr.Row():
338
  #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)
339
  search_btn.click(fn=filter_data, inputs=[env, grpath, user_id], outputs=gr_dataframe, api_name="filter_data")
 
 
 
 
340
 
341
  block.launch()
342
 
 
329
  with gr.Row():
330
  user_id = gr.Textbox(label= "Your user id")
331
  search_btn = gr.Button("Search my models πŸ”Ž")
332
+ reset_btn = gr.Button("Clear my search")
333
  env = gr.Variable(rl_env["rl_env"])
334
  grpath = gr.Variable(path_)
335
  with gr.Row():
 
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, grpath, user_id], outputs=gr_dataframe, api_name="filter_data")
341
+
342
+ with gr.Row():
343
+ search_btn.click(fn=filter_data, inputs=[env, grpath, user_id], outputs=gr_dataframe, api_name="filter_data")
344
+ reset_btn.click(fn=get_data, inputs=[rl_env["rl_env"], path_], outputs=gr_dataframe, api_name="get_data")
345
 
346
  block.launch()
347