Giter VIP home page Giter VIP logo

chat_with_csv_streamlit_with_chart's Introduction

Chat with your CSV (with chart visualization)

In this repository, you will find an example code for creating an interactive chat experience that allows you to ask questions about your CSV data. The code uses Pandas Dataframe Agent from LangChain and a GPT model from Azure OpenAI Service to interact with the data. To make the chat more versatile, I incorporated some prompt engineering techniques that instruct the GPT model to use the popular data visualization library, Matplotlib, to create charts based on your queries. The chart is then saved and visualized using the Streamlit frontend interface. This feature can create any type of chart (pie, line, scatter, etc.) as long as you provide clear instructions. Additionally, the code can also return the dataframe as a table or provide a straightforward answer.

The data for analysis is sourced from Kaggle's Telco Customer Churn dataset, providing a comprehensive view of customer information to develop effective retention programs.

To run this Streamlit web app

streamlit run run.py

Sample query to give a straightforward answer. alt text

Sample query to show the result in the table. alt text

Sample query to show the result in a bar chart. alt text

Sample query to show the result in a pie chart. alt text

Enjoy!

chat_with_csv_streamlit_with_chart's People

Contributors

easonlai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.