Closed teraktor2006 closed 8 months ago
Can you share the code you have right now?
In general,
from lida import Manager, llm
lida = Manager(text_gen = llm("openai")) # palm, cohere ..
summary = lida.summarize("data/cars.csv")
goals = lida.goals(summary, n=2) # exploratory data analysis
charts = lida.visualize(summary=summary, goal=goals[0]) # exploratory data analysis
In the snippet above, charts is an array of objects ChartExecutorResponse which has a code field.
charts[0].code
Thanks. I am using this demo: https://github.com/AIAnytime/LIDA-Demo-Streamlit-App/blob/main/app.py Another problem that I am facing for some queries is that the charts is empty list []. But interestingly, once it happens it shows the code as log and that code is actually working! I was wondering is this a bug? The problem is that if list is empty then I cannot access that code either with charts[0].code
textgen_config = TextGenerationConfig(n=1, temperature=0.2, use_cache=True)
summary = lida.summarize("filename1.csv", summary_method="default", textgen_config=textgen_config)
user_query = text_area
charts = lida.visualize(summary=summary, goal=user_query, textgen_config=textgen_config) ```
Hi, Is there any way to get access to the code that lida generate and use to plot?