microsoft / lida

Automatic Generation of Visualizations and Infographics using Large Language Models
https://microsoft.github.io/lida/
MIT License
2.66k stars 282 forks source link

Introduce reprs for some of the base objects #15

Closed rgbkrk closed 1 year ago

rgbkrk commented 1 year ago

This introduces ipython / Jupyter representations for Python objects to allow easier viewing in a notebook.

For instance, running this code will display all the charts from lida.visualize

i = 0
library = "seaborn"
textgen_config = TextGenerationConfig(n=1, temperature=0.2, use_cache=True)
charts = lida.visualize(
    summary=summary, goal=goals[i], textgen_config=textgen_config, library=library
)
for chart in charts:
    display(chart)

image

and you can also just the chart be the execution result for the cell:

library = "seaborn"
textgen_config = TextGenerationConfig(n=1, temperature=0.2, use_cache=True)
charts = lida.visualize(
    summary=summary, goal=goals[i], textgen_config=textgen_config, library=library
)
charts[0]

image

Additionally, I did the same for goals:

image

Working on updating the notebook example as well once my machine has the infographics dependencies working well.

rgbkrk commented 1 year ago

@microsoft-github-policy-service agree company="Noteable"