Hi,
I am using the Langchain Pandas agent in Google Colab which is displaying the Bar Chart as expected. Check the attached image bellow
But, when using Streamlit, st.write is just writing the text message, not the bar chart.
Any idea how to solve that?
Hi @ifightcode
Yes certainly, there are several options that you can use to display charts in your Streamlit app. st.write although is a magic command but it is primarily for displaying text.
You can use of several Streamlit commands for displaying charts in your Streamlit app in this Streamlit Docs page on Chart elements.
The easiest is to use Streamlit’s built-in st.bar_chart to display the bar chart.
Best regards,
Chanin
I solved the issue by using Matplotlib and pyplot.
But this seems great.
Thanks for sharing.
Hi i am trying to experiment as well with langchain agent and charts based on results. Can you please give some guidelines how you achieved this? Any idea how to draw a chart from database results when using SQLDatabaseChain?