{"id":23057458,"url":"https://github.com/concaption/streamlit-langchain-csv-qna","last_synced_at":"2025-04-28T11:17:09.259Z","repository":{"id":193618661,"uuid":"689146298","full_name":"concaption/streamlit-langchain-csv-qna","owner":"concaption","description":"A streamlit based chatbot for custom CSV data.","archived":false,"fork":false,"pushed_at":"2023-09-09T03:12:20.000Z","size":188,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-28T11:17:01.420Z","etag":null,"topics":["chatbot","csv","langchain","python","streamlit"],"latest_commit_sha":null,"homepage":"https://langchain-csv-qna.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/concaption.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-08T23:30:37.000Z","updated_at":"2023-12-28T21:29:28.000Z","dependencies_parsed_at":"2023-09-09T03:55:44.509Z","dependency_job_id":null,"html_url":"https://github.com/concaption/streamlit-langchain-csv-qna","commit_stats":null,"previous_names":["concaption/streamlit-langchain-csv-qna"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/concaption%2Fstreamlit-langchain-csv-qna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/concaption%2Fstreamlit-langchain-csv-qna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/concaption%2Fstreamlit-langchain-csv-qna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/concaption%2Fstreamlit-langchain-csv-qna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/concaption","download_url":"https://codeload.github.com/concaption/streamlit-langchain-csv-qna/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251302782,"owners_count":21567601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","csv","langchain","python","streamlit"],"created_at":"2024-12-16T02:12:23.577Z","updated_at":"2025-04-28T11:17:09.240Z","avatar_url":"https://github.com/concaption.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Streamlit CSV Q\u0026A Chatbot\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)\n[![Downloads](https://img.shields.io/pypi/dm/your-package-name.svg)](https://pypi.org/project/your-package-name/)\n[![Contributors](https://img.shields.io/github/contributors/concaption/streamlit-langchain-csv-qna.svg)](https://github.com/concaption/streamlit-langchain-csv-qna/graphs/contributors)\n[![Code Style](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/psf/black)\n[![GitHub Issues](https://img.shields.io/github/issues/concaption/streamlit-langchain-csv-qna.svg)](https://github.com/concaption/streamlit-langchain-csv-qna/issues)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/concaption/streamlit-langchain-csv-qna/pulls)\n\n![](./assets/screenshot.png)\n## Overview\n\nThis is a chatbot application built using Streamlit and a series of NLP tools. The application allows users to upload a CSV file containing textual information. The chatbot can then respond to questions about the data stored in the uploaded CSV file.\n\n## Todo\n- [ ] Write a blog post on it.\n- [ ] Refactor\n- [ ] Re Write code such that it can be used a tutorial.\n## Installation and Usage\n\n### Prerequisites\n\n- Python 3.6 or higher\n- Git\n- OpenAI API Key\n\n### Clone the Repository\n\nTo clone the repository, run the following command in your terminal:\n\n```bash\ngit clone https://github.com/concaption/streamlit-langchain-csv-qna.git\ncd streamlit-langchain-csv-qna\n```\n\n### Create Virtual Environment\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate\n```\n\n### API Key Setup\n\nCreate an OpenAI API key from [here](https://platform.openai.com/account/api-keys) and add it to `.streamlit/secrets.toml`:\n\n```toml\nopen_ai_api_key = \"your-api-key-here\"\n```\n\n### Install Dependencies\n\nRun the following command to install the necessary packages:\n\n```bash\nmake install\n```\n\n### Linting and Formatting\n\nTo lint the code, run:\n\n```bash\nmake lint\n```\n\nTo format the code, run:\n\n```bash\nmake format\n```\n\n### Testing\n\nRun the following command to execute tests:\n\n```bash\nmake test\n```\n\n### Running the App\n\nTo run the application, execute:\n\n```bash\nmake run\n```\n\n## Features\n\n- Upload a CSV file to query against\n- Ask questions in natural language about the uploaded CSV data\n- Uses OpenAI's GPT model to generate human-like responses\n- Session storage for previous interactions\n- Secure OpenAI API key storage via Streamlit secrets\n\n## Workflow Commands\n\n- `make install`: Install dependencies\n- `make lint`: Lint the code\n- `make format`: Format the code\n- `make test`: Run the test suite\n- `make run`: Run the application\n- `make refactor`: Run lint and format\n- `make all`: Perform install, lint, format, test, and run in one command\n\n## Architecture\n\nThe architecture is fairly straightforward:\n\n- `CSVLoader`: For loading and handling the CSV file.\n- `VectorstoreIndexCreator`: For indexing the loaded documents.\n- `RetrievalQA`: For retrieving answers from the indexed documents.\n- `OpenAI`: For leveraging OpenAI's GPT model to generate natural language responses.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n\n---\n\nMade with :heart: by [Usama Navid](buildberg.co/about). For any issues or suggestions, open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconcaption%2Fstreamlit-langchain-csv-qna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconcaption%2Fstreamlit-langchain-csv-qna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconcaption%2Fstreamlit-langchain-csv-qna/lists"}