Skip to content

jimmc414/csvchat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSVChat

CSVChat is a Python project that allows you to ask questions about a CSV file and get answers using natural language processing.

Features Load a CSV file using csvloader Create an index using vectorstoreindexcreator Create a question answering chain using retrievalqa Use OpenAI as the language model Pass questions and get responses Installation To run this project, you need to have Python 3 and pip installed on your system. You also need to have an OpenAI API key.

Clone this repository using:

git clone https://github.com/yourusername/csvchat.git Navigate to the project directory and install the required dependencies using:

pip install -r requirements.txt Usage Open the csvchat.py file and replace the ? with your desired question. For example:

query = "What is the average age of the students?" Save the file and run it using:

python csvchat.py You should see a response like this:

{"answer": "The average age of the students is 21.5 years."} You can change the CSV file, the index, or the chain type according to your needs.

License This project is licensed under the MIT License - see the LICENSE file for details.

About

Chat with a CSV

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages