A Streamlit-based application that allows users to interact with CSV files through a conversational interface. Upload your CSV, ask questions about its contents, and get intelligent responses powered by a Large Language Model (LLM).
- CSV Upload: Upload and preview CSV files directly in the app.
- Intelligent Query Handling: Ask questions about your CSV's contents, and get accurate, AI-generated responses.
- Chat Interface: User-friendly chat interface for seamless interaction.
- LLM Integration: Utilizes Groq’s
llama3-70b-8192
model for intelligent and contextual responses.
-
CSV Upload:
- Users upload CSV files, which are displayed in the sidebar for preview.
- Validates the CSV file to ensure it is not empty.
-
Question Answering:
- Users input prompts through a chat interface.
- The app processes the query using a CSV agent integrated with the Groq LLM.
-
Clone the Repository:
git clone https://github.com/Osama-Abo-Bakr/Chat-with-any-csv.git cd Chat-with-any-csv
-
Install Dependencies:
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install required packages:
pip install -r requirements.txt
- Create a virtual environment:
-
Set Up Environment Variables:
- Create a
.env
file in the project directory and add your credentials:GROQ_API_KEY=your_groq_api_key
- Create a
-
Run the Application:
streamlit run app.py
-
Upload and Interact:
- Use the sidebar to upload your CSV file.
- Ask questions or provide prompts in the chat input.
- View AI-generated responses based on the CSV data.
- Streamlit: For building the interactive web application.
- LangChain: For integrating the conversational agent.
- Pandas: For reading and previewing CSV files.
- Groq: For large language model-based question answering.
- Add support for large CSV files with efficient processing.
- Enhance UI/UX with data visualization features.
- Enable exporting chat history for reference.
- Add support for additional file formats (e.g., Excel).
Contributions are welcome! Feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Osama Abo Bakr
GitHub: Osama-Abo-Bakr
- Special thanks to the developers of Streamlit, LangChain, Pandas, and Groq for their amazing tools!