Skip to content

alejandro-ao/langchain-ask-csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Langchain Chat-CSV with OpenAI (Tutorial)

You can find the step-by-step video tutorial to build this application on YouTube.

This is a Python application that enables you to load a CSV file and ask questions about its contents using natural language. The application leverages Language Models (LLMs) to generate responses based on the CSV data. The LLM will only provide answers related to the information present in the CSV.

How it works

The application reads the CSV file and processes the data. It utilizes OpenAI LLMs alongside with Langchain Agents in order to answer your questions. The CSV agent then uses tools to find solutions to your questions and generates an appropriate response with the help of a LLM.

The application employs Streamlit to create the graphical user interface (GUI) and utilizes Langchain to interact with the LLM.

Installation

To install the repository, follow these steps:

  1. Clone this repository to your local machine.

  2. Install the necessary dependencies by running the following command:

    pip install -r requirements.txt
    
  3. Additionally, you need to obtain an OpenAI API key and add it to the .env file.

Usage

To use the application, execute the main.py file using the Streamlit CLI. Make sure you have Streamlit installed before running the application. Run the following command in your terminal:

streamlit run main.py

Contributing

This repository is intended for educational purposes only and is not designed to accept external contributions. It serves as supplemental material for the YouTube tutorial, demonstrating how to build the project.

For any suggestions or improvements related to the tutorial content, please feel free to reach out through the YouTube channel's comment section.

About

A Langchain app that allows you to ask questions to a CSV file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages