Closed kongwei closed 2 weeks ago
dataframe can not refresh from 4.17.0 If set row_count as len(data)+1, the dataframe can refresh.
import gradio as gr import random def show_scan_result(): data = [['1','','','',str(random.randint(1, 100))], ['2','','','',str(random.randint(1, 100))], ['3','','','',str(random.randint(1, 100))]] return data with gr.Blocks() as b: task_info = gr.DataFrame(datatype=["str", "str", "str", "str", "str"], headers=["ID", "Name", "ReportName", "CreateTime", 'Status']) b.load(show_scan_result, inputs=None, outputs=task_info, every=5) b.launch()``` ### Screenshot ![image](https://github.com/gradio-app/gradio/assets/2822004/f12af39b-e070-4d1b-b11e-09a2cbf18ffc) ### Logs ```shell New message is correct(diff) {"msg":"process_generating","event_id":"766e28b8dd5e44b89288455ac803ad12","output":{"data":[[["replace",["data",0,4],"58"],["replace",["data",1,4],"19"],["replace",["data",2,4],"2"]]],"is_generating":true,"duration":5.0008909702301025,"average_duration":4.864086980689062},"success":true}
Gradio Environment Information: ------------------------------ Operating System: Linux gradio version: 4.28.3 gradio_client version: 0.16.0 ------------------------------------------------ gradio dependencies in your environment: aiofiles: 23.2.1 altair: 5.2.0 fastapi: 0.110.0 ffmpy: 0.3.2 gradio-client==0.16.0 is not installed. httpx: 0.27.0 huggingface-hub: 0.21.4 importlib-resources: 6.1.3 jinja2: 3.1.3 markupsafe: 2.1.5 matplotlib: 3.8.3 numpy: 1.26.4 orjson: 3.9.15 packaging: 23.2 pandas: 2.2.1 pillow: 10.2.0 pydantic: 2.6.3 pydub: 0.25.1 python-multipart: 0.0.9 pyyaml: 6.0.1 ruff: 0.3.2 semantic-version: 2.10.0 tomlkit==0.12.0 is not installed. typer: 0.12.3 typing-extensions: 4.10.0 urllib3: 2.2.1 uvicorn: 0.28.0 authlib; extra == 'oauth' is not installed. itsdangerous; extra == 'oauth' is not installed. gradio_client dependencies in your environment: fsspec: 2024.2.0 httpx: 0.27.0 huggingface-hub: 0.21.4 packaging: 23.2 typing-extensions: 4.10.0 websockets: 11.0.3
I can work around it
repeat: https://github.com/gradio-app/gradio/issues/8160
Describe the bug
dataframe can not refresh from 4.17.0 If set row_count as len(data)+1, the dataframe can refresh.
Have you searched existing issues? π
Reproduction
System Info
Severity
I can work around it