Streamlit app: How I see my plots in streamlit interface. At present plot is creating as a temp_chat.png file. #772
|
I am using pandasai 1.4.10 and asking questions via streamilt interface. While I am asking plots, streamlit showing as 'None'. However my backend has an error "C:\Users\a024377\AppData\Roaming\Python\Python311\site-packages\pandasai\responses\response_parser.py:107: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. |
Replies: 4 comments 6 replies
|
Hi @mraguth , check streamlit example https://github.com/gventuri/pandas-ai/blob/main/examples/using_streamlit.py |
|
Hi @gventuri I do have the same issue, plot is generated and saved as a temp_chart.png. logger's The user asked the following question: QUERYHow does the distribution of item visibility vary across different outlet types? You generated this python code: It fails with the following error: Fix the python code above and return the new python code: The user asked the following question: QUERYHow does the distribution of item visibility vary across different outlet types? You generated this python code: It fails with the following error: Fix the python code above and return the new python code: INFO:pandasai.helpers.logger:Code generated: df = pd.concat(dfs) INFO:pandasai.helpers.logger:Executing Step 2: CodeCleaning |
|
I did a workaround for now. |
|
Try using following in the prompt: With OpenAI extension (does not work with LiteLLM - need investigation) it generates the following code: |
Hi @mraguth , check streamlit example https://github.com/gventuri/pandas-ai/blob/main/examples/using_streamlit.py