This project leverages the Streamlit library to create an interactive web interface for data analysis. Users can upload data files in CSV format, which are then analyzed with the help of a Language Learning Model (LLM) from OpenAI. The analysis is facilitated by LangChain's Pandas DataFrame agent, providing insightful responses to predefined questions and enabling users to ask specific queries about their data.
- Streamlit Interface: A user-friendly web interface for uploading and analyzing CSV data files.
- Predefined Questions: The application begins with a set of predefined questions that offer a general overview of the data file.
- Custom Queries: Users can select specific columns and ask custom questions to the LLM for a more detailed analysis.
- LangChain Integration: Utilizes LangChain's Pandas DataFrame agent to interface with the data and generate insights.
- Python 3.8 or higher
- Streamlit
- OpenAI API key
- LangChain
-
Clone the repository
git clone https://github.com/yourusername/data-analysis-streamlit-llm.git cd data-analysis-streamlit-llm -
Install the required packages
pip install -r requirements.txt
-
Set up OpenAI API Key
- Obtain your API key from OpenAI.
- Create a
.envfile in the project root and add your API key:OPENAI_API_KEY=your_openai_api_key
-
Start the Streamlit server
streamlit run EDA_with_langchain_streamlit.py
-
Open your web browser
- Navigate to
http://localhost:8501to access the application.
- Navigate to
- Upload your CSV file: Click on the "Browse files" button to select and upload your CSV file.
- General Overview: The application will provide answers to predefined questions that give a general overview of the data.
- Select Data Column: Choose a specific column from the dropdown menu for detailed analysis.
- Ask Questions: Enter your custom questions regarding the selected column. The LLM will analyze the data and provide insightful responses.
- EDA_with_langchain_streamlit.py: The main application file containing the Streamlit interface.
- requirements.txt: Lists the dependencies required for the project.
Watch the demo video by clicking here.
This project is licensed under the MIT License. See the LICENSE file for details.