gradio: max_rows/pagination does not seem to work
Describe the bug
If you create a DataFrame
with a certain number of max_rows
, it still shows all of the original rows. I found https://github.com/gradio-app/gradio/issues/1201, which says they’re not implemented, but both the code and documentation seem to suggest they are.
Is there an existing issue for this?
- I have searched the existing issues
Reproduction
import gradio as gr
with gr.Blocks() as demo:
a = gr.DataFrame(headers=['a'], value=[[1]]*20, max_rows=1)
if __name__ == "__main__":
demo.launch()
Screenshot
Logs
N/A
System Info
tried with 3.1.7 and 3.2
Severity
serious, but I can work around it
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (3 by maintainers)
+1 I’m also experiencing this issue
Experiencing the same. Hope this gets implemented as max_rows and overflow_row_behaviour don’t seem to be working as indicated in docs.
Here are my examples https://colab.research.google.com/drive/1gQDcFd-nUx4iZrhew_HGFGq6_cV32OnJ?usp=sharing
@dawoodkhan82 Let’s work together to fix this!
@EmilyAlsentzer @ankrgyl Thanks for reporting - we’ll try to get a fix out soon 😄
is there any workaround meanwhile?
We discussed internally and there are a few things we need to consider to get the best pagination experience for
gr.Dataframe
(for example, does it load all the data to the frontend or does it lazy load the data? If lazy loading, how do other features like sorting work)? As a result, we’ve decided to put this off for now. We’ll revisit in a few weeks.