Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 1.31 KB

README.md

File metadata and controls

28 lines (19 loc) · 1.31 KB

ChatYourCovidData

A simple webchat using pandasAI to talk to data. FastAPI as backend, HTMX for frontend.

image

Overview

PandasAI is a Python library that adds Generative AI capabilities to pandas, it uses prompt engineering to query LLMs, such as OpenAI GPT4, to get it to write the code necessary to extract the information we want from a given dataframe (or even several dataframes). It even has a neat code debugging prompt where it tries to get the LLM to correct itself if the code generated fails.

It works nicely in a notebook but I wanted to see if it could be used in a production app. After a bit of tweaking I got it to work and this is the resulting proof of concept.

Try it out

You can try this app here.

Try it locally

⚠️You need to have docker installed.

If you want to try it on your computer, open a terminal and do the following:

⚠️Replace YOUR_OPENAI_KEY with your actual OpenAI API key.

gh repo clone adrienB134/ChatYourCovidData
cd ChatYourCovidData
echo OPENAI_KEY='YOUR_OPENAI_KEY' > .env
source launch.sh

Then open http://0.0.0.0:4000 in your favorite browser.