Fix TimeSeries examples not properly displayed in UI#2064
Conversation
|
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-2064-all-demos |
|
Theres an issue with cache_examples. Taking a look now. |
| return None | ||
| if isinstance(y, str): | ||
| y = pd.read_csv(y) | ||
| return {"headers": y.columns.values.tolist(), "data": y.values.tolist()} |
There was a problem hiding this comment.
All return values need to have headers now.
There was a problem hiding this comment.
Oh maybe this is only true for Dataframe, ideally we'd make the interfaces consistent since they are very similar. What is the reason for this change, how does it address the issue?
There was a problem hiding this comment.
Removed this change, and instead changed the frontend to convert the timeseries obj to string (to fix examples).
freddyaboulton
left a comment
There was a problem hiding this comment.
Thanks for the fix @dawoodkhan82 ! Confirm it works locally for me.
Code change makes sense to me but defer to you since you are more familiar with it!
| reader.readAsText(blob); | ||
| } | ||
|
|
||
| function dict_to_string(dict: any) { |
There was a problem hiding this comment.
Convert the timeseries dict to string format to be accepted by Chart component.
|
LGTM, works for me locally. It looks like @pngwn's comments were resolved, so let's go ahead and merge this @dawoodkhan82? |
|
I'll go ahead and merge this in @dawoodkhan82 to avoid conflicts from popping up later! |
Description
Fix TimeSeries Example
Screen.Recording.2022-08-23.at.12.44.42.PM.mov
Please include:
Closes: #1767
Checklist: