vpurandara

Results 6 comments of vpurandara

I have a solution here. I'm using ```plt.ion()``` before ```pandas_ai.run(...)```, to make it interactive mode. With this, the execution won't wait at ```plt.show()``` and it will execute ```plt.close('all')``` as well....

I'm using PandasAI(llm, save_charts=True) as well. My issue is not with saving the chart, except first result every other result graph is overlapping with previous graph

First time graph is giving results fine: -------------------------------------------------------------------------- ![image](https://github.com/gventuri/pandas-ai/assets/110787207/146d94e5-8468-4908-bfe9-6639799f2f59) Running PandasAI with openai LLM... Code generated: ``` import pandas as pd import matplotlib.pyplot as plt # read the dataframe from...

this basically happens while using it in a API.

The issue is resolved, if I add plt.close() after every API request: llm = OpenAI(api_token=OpenAI_ACCESSKEY) pandas_ai = PandasAI(llm, save_charts=True) response = pandas_ai.run(analytics_df, prompt=f"{inputQuestion}, as png image with filename as {timestamp}2.png")...

@prise6 This work around resolved the issue. Thanks