ysharma HF staff commited on
Commit
3a40f3f
·
1 Parent(s): 02a347a

update setting up api access to event lisners

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,9 +35,9 @@ with gr.Blocks() as demo:
35
  with gr.Row():
36
  out_dataframe = gr.Dataframe(wrap=True, max_rows=10, overflow_row_behaviour= "paginate", datatype = ["markdown", "markdown", "str", "str", "str", "str", "str", "str"], interactive=False)
37
 
38
- b1.click(fn=display_df, outputs=out_dataframe)
39
- b2.click(fn=display_next10, inputs= [out_dataframe, num_end ], outputs=[out_dataframe, num_end])
40
-
41
  gr.Markdown("<center>Please note that the Playground AI dataset shared on GitHub doesn't have images but links to those images. The idea is to get the maximum benefit out of this dataset and to find the best way to explore this dataset. Gradio enables us to embed markdowns within a dataframe, thus this app is able to display actual images instead of direct links(meh!). I hope you will have as much fun playing with this Space as I had building it.</center>")
42
 
43
  demo.launch(debug=True, show_error=True)
 
35
  with gr.Row():
36
  out_dataframe = gr.Dataframe(wrap=True, max_rows=10, overflow_row_behaviour= "paginate", datatype = ["markdown", "markdown", "str", "str", "str", "str", "str", "str"], interactive=False)
37
 
38
+ b1.click(fn=display_df, outputs=out_dataframe, api_name="initial_dataframe")
39
+ b2.click(fn=display_next10, inputs= [out_dataframe, num_end ], outputs=[out_dataframe, num_end], api_name="next_10_rows")
40
+
41
  gr.Markdown("<center>Please note that the Playground AI dataset shared on GitHub doesn't have images but links to those images. The idea is to get the maximum benefit out of this dataset and to find the best way to explore this dataset. Gradio enables us to embed markdowns within a dataframe, thus this app is able to display actual images instead of direct links(meh!). I hope you will have as much fun playing with this Space as I had building it.</center>")
42
 
43
  demo.launch(debug=True, show_error=True)