An intelligent CSV file analysis tool powered by OpenAI GPT models and Streamlit. Ask questions about your data in natural language and get instant insights, visualizations, and analysis.
- Natural Language Queries: Ask questions about your data in plain English
- Automated Analysis: Get instant insights and visualizations
- Interactive Visualizations: Dynamic charts and graphs using Plotly
- Step-by-Step Analysis: Watch the analysis process unfold in real-time
- Downloadable Results: Export processed data and analysis results
- Smart Summaries: AI-generated insights and key findings
- Clone the repository:
git clone https://github.com/JoshiSneh/CSV-Analyzer.git
cd CSV-Analyzer- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install required packages:
pip install -r requirements.txt-
Get an OpenAI API key from OpenAI Platform
-
Run the application:
streamlit run app_streamlit_new.py- Launch the application
- Enter your OpenAI API key in the sidebar
- Upload a CSV file using the file uploader
- Enter your question about the data in natural language
- Click "Analyze Data" to start the analysis
- View the results in three phases:
- Analysis Planning
- Execution
- Summary and Insights
- Follow-up Questions
csv-analyzer/
|-- config/settings.py
|-- services/analysis_service.py
|-- services/openai_service.py
|-- utils/data_loader.py
|-- utils/visualization.py
|-- app_streamlit_new.py # Main application file
|-- requirements.txt # Project dependencies
└── README.md # Documentation
- Data Upload: Supports CSV/EXCEL file upload with preview functionality
- Query Processing: Natural language processing using OpenAI GPT models
- Analysis Pipeline:
- Task Planning: Breaks down user query into actionable steps
- Task Execution: Performs the analysis using pandas and plotly
- Summary Generation: Creates human-readable insights
- Visualization: Interactive charts and graphs using Plotly
Create a .env file with the following variables (optional):
OPENAI_API_KEY=your_api_key_here
- The application requires an OpenAI API key
- API keys are stored only in session state and are not permanently saved
- Currently, it cannot retry the Python code if the code failed to get executed.
This project is licensed under the MIT License - see the LICENSE file for details.