Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run code to create a chart #137

Open
akhilraghupatruni9 opened this issue Sep 27, 2024 · 2 comments
Open

Unable to run code to create a chart #137

akhilraghupatruni9 opened this issue Sep 27, 2024 · 2 comments

Comments

@akhilraghupatruni9
Copy link

akhilraghupatruni9 commented Sep 27, 2024

Constantly showing the below error:

chart = plot(data)

****
 name 'np' is not defined

charts[0]
IndexError: list index out of range


Refer my code below:


from lida import Manager, TextGenerationConfig , llm
lida = Manager(text_gen = llm("openai", api_key="<my-api-key>")) # !! api key
textgen_config = TextGenerationConfig(n=1, temperature=0.5, model="gpt-3.5-turbo", use_cache=True)

summary = lida.summarize("https://raw.githubusercontent.com/uwdata/draco/master/data/cars.csv", summary_method="default", textgen_config=textgen_config)
goals = lida.goals(summary, n=2, textgen_config=textgen_config)

#for goal in goals:
    #print(goal)

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)
charts[0]
@anguswilliams93
Copy link

yeah same issue... exists in one of the texxtgen configs..

@akhilraghupatruni9
Copy link
Author

yeah same issue... exists in one of the texxtgen configs..

Are u able to find a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants