-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Gradio load update dataframe have some bug after 4.16 version #8160
Comments
maybe apply_diff in B.Load has some bug |
Hi @littleping1987 thanks for including the code snippet. It would be great if you can include a function |
@abidlabs Hello, I am also running into something similar: import pandas as pd
import gradio as gr
from random import randrange
_data = {
"Freddy": 100,
"Maria": 80,
"Mark": 10,
}
def get_scores():
for name in _data.keys():
_data[name] = randrange(start=100)
return pd.DataFrame({
"Score": _data.values(),
"Name": _data.keys(),
})
with gr.Blocks() as demo:
with gr.Row():
with gr.Column():
gr.DataFrame(get_scores, every=5)
demo.queue().launch() I would expect the dataframe to redraw as the data changes. Also it does not refresh when rows are removed, only added. |
I confirmed this is indeed a regression when moving from 4.16 to 4.17. |
Git bisect reveals the following commit as the problem: |
Hi, apologies for the late follow up. We haven't had a chance to look into this issue, but the Gradio codebase has changed quite significantly since this issue was created, particularly with the release of Gradio 5. Could you let us know if this is still an issue in the latest version of Gradio ( |
Hi @abidlabs , I'm facing the similar issues, exactly after 4.16.0 (4.16.0 is that last version working). And I checked recently, the problem still exists in gradio==5.1.0 To reproduce please try the below code with once
You can see the table doesn't get updated after the first update. |
i also facing this issues, my version is 5.1.0
|
We'll look into this issue after the holidays! |
Have not been fixed as for this one:
upon second click of generate(refreshing table = {})) it keep some values from previous state @abidlabs take a look on this one please |
I'm quite confused with that code example @AndriiZelenko, what is it that you're trying to do exactly? Can you explain the expected behavior or provide a simpler repro perhaps without the globals? |
Yep, so general idea is, i would like to create a gradio demo app, which will continuously read-write some data(like a video stream app), then upon button click, i would like to upload result of parsed data to dataframe and keep it there, while still running my while loop of reading-writing data. Then upon clicking button again, it should reset dataframe value to initial state, but what it really does it keep some random values in dataframe.
and this one still contains some random values in the end of dataframe |
Describe the bug
In Gradio 4.16, this feature worked well. However, in the latest version, there was an issue with updating the data in the Dataframe. When the table data changes, the Dataframe can recognize the data in a timely manner and add new ones. However, when the data already exists and the data status is updated, it cannot be updated and the page needs to be refreshed.
Have you searched existing issues? 🔎
Reproduction
Screenshot
Logs
No response
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: