/ChatCSV

A Streamlit app leveraging ChatOpenAI to analyze uploaded CSV data. Users can ask statistical questions about their CSV content & get instant insights using the OpenAI model.

Primary LanguagePython


ChatCSV

◦ Connect. Collaborate. Convert. ChatCSV.

◦ Developed with the software and tools listed below.


Streamlit OpenAI Python pandas Markdown   🦜️🔗 LangChain



📒 Table of Contents


📍 Overview

The ChatCSV project is a Streamlit application that enables users to upload a CSV file and ask statistical questions about its contents. It leverages the ChatOpenAI model to interpret and answer user queries. The purpose of this project is to provide an intuitive interface for data analysis, allowing users to gain insights from their datasets without the need for complex coding or data manipulation. Its value proposition lies in its simplicity and effectiveness in transforming raw data into actionable insights through natural language queries.


⚙️ Features

Feature Description
⚙️ Architecture The system follows a client-server architecture where the Streamlit application interacts with the langchain library's ChatOpenAI model. The codebase is designed as a single-file application, with the main functionality implemented in the app.py script.
🔗 Dependencies The codebase relies on external dependencies such as the langchain library, Streamlit, Pandas, and Requests. These libraries are crucial for the functionality of the application and handling CSV operations.
🧩 Modularity The codebase is organized into a simple modular structure.
⚡️ Performance Performance depends largely on the langchain library and the underlying models it uses. No specific performance optimizations or benchmarks are implemented in the codebase. Performance can be improved by optimizing code, managing resources efficiently, and caching/query optimization in the underlying libraries.
🔀 Version Control Version control for the project is managed using Git, as evident from the GitHub repository. Proper commit messages and descriptive branches facilitate collaboration and code maintenance.
🔌 Integrations The system primarily interacts with the Streamlit framework for providing the web-based user interface. The system integrates with the OpenAI ChatOpenAI model from the langchain library to provide interpretive and answering capabilities.

🧩 Modules

Root
File Summary
app.py The code is a Streamlit application called ChatCSV. It allows users to upload a CSV file and ask statistical questions about its content. The application uses the ChatOpenAI model from the langchain library to interpret and answer user queries. The main function configures the Streamlit page, accepts CSV file uploads, takes user input for questions, processes the questions using the ChatOpenAI model, and displays the model's response. To run the application, execute the script after installing the required dependencies and setting the OpenAI API key.

🚀 Getting Started

✔️ Prerequisites

Before you begin, ensure that you have the following prerequisites installed:

  • pip install langchain
  • pip install openai
  • pip install pandas
  • pip install streamlit

📦 Installation

  1. Clone the ChatCSV repository:
git clone https://github.com/rahul2002m/ChatCSV
  1. Change to the project directory:
cd ChatCSV
  1. Install the dependencies:
pip install -r requirements.txt

🎮 Using ChatCSV

streamlit run app.py

🤝 Contributing

Contributions are always welcome! Please follow these steps:

  1. Fork the project repository. This creates a copy of the project on your account that you can modify without affecting the original project.
  2. Clone the forked repository to your local machine using a Git client like Git or GitHub Desktop.
  3. Create a new branch with a descriptive name (e.g., new-feature-branch or bugfix-issue-123).
git checkout -b new-feature-branch
  1. Make changes to the project's codebase.
  2. Commit your changes to your local branch with a clear commit message that explains the changes you've made.
git commit -m 'Implemented new feature.'
  1. Push your changes to your forked repository on GitHub using the following command
git push origin new-feature-branch
  1. Create a new pull request to the original project repository. In the pull request, describe the changes you've made and why they're necessary. The project maintainers will review your changes and provide feedback or merge them into the main branch.