Skip to content

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

Notifications You must be signed in to change notification settings

adrienB134/ChatYourCovidData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published