{"id":18058227,"url":"https://github.com/sahil352005/chatwithpdf-images","last_synced_at":"2026-05-09T05:03:49.038Z","repository":{"id":259713367,"uuid":"879260807","full_name":"sahil352005/ChatWithPdf-Images","owner":"sahil352005","description":"A Streamlit-based app that allows users to upload PDFs or images, extract text, and engage in interactive Q\u0026A. Using Google Generative AI, this app enables insightful conversations based on document contents. Ideal for those seeking quick answers from their files in a simple, intuitive interface.","archived":false,"fork":false,"pushed_at":"2025-02-08T14:07:06.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T19:43:44.099Z","etag":null,"topics":["chat-application","chatbot","gemini-api","ocr","pdf2text","pillow","pytesseract","python","streamlit","textextracting"],"latest_commit_sha":null,"homepage":"","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/sahil352005.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-27T12:50:44.000Z","updated_at":"2025-02-19T14:25:56.000Z","dependencies_parsed_at":"2024-10-27T14:31:07.442Z","dependency_job_id":"9649f483-3362-40f3-b908-a640964849db","html_url":"https://github.com/sahil352005/ChatWithPdf-Images","commit_stats":null,"previous_names":["sahil352005/chatwithpdf-images"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sahil352005/ChatWithPdf-Images","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil352005%2FChatWithPdf-Images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil352005%2FChatWithPdf-Images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil352005%2FChatWithPdf-Images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil352005%2FChatWithPdf-Images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sahil352005","download_url":"https://codeload.github.com/sahil352005/ChatWithPdf-Images/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil352005%2FChatWithPdf-Images/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chat-application","chatbot","gemini-api","ocr","pdf2text","pillow","pytesseract","python","streamlit","textextracting"],"created_at":"2024-10-31T03:05:41.909Z","updated_at":"2026-05-09T05:03:49.017Z","avatar_url":"https://github.com/sahil352005.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n```markdown\n# Chat with PDF and Images 📄🤖\n\nA Streamlit-based app that enables users to upload PDF documents or images, extracts text from them, and allows interactive chat about the contents. This app uses Google Generative AI (Gemini API) to answer questions based on the uploaded documents.\n\n## Features\n- Upload PDF or Image (PNG, JPG, JPEG) files.\n- Extract text from PDF documents or images.\n- Ask questions related to the uploaded content.\n- Interactive chat interface with animated styling.\n- Simple, clean UI with custom CSS styles.\n\n## Tech Stack\n- **Streamlit**: For creating an interactive UI.\n- **PyPDF2**: To extract text from PDF files.\n- **Tesseract OCR**: To extract text from images.\n- **Google Generative AI (Gemini API)**: For generating answers based on extracted text.\n- **Pillow**: For image processing.\n\n## Getting Started\n\n### Prerequisites\n1. Python 3.7+\n2. [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) installed (ensure the path to `tesseract.exe` is correct).\n3. Google Generative AI (Gemini API) key.\n\n### Installation\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/sahil352005/ChatWithPdf-Images.git\n   cd ChatWithPdf-Images\n   ```\n\n2. **Set up a virtual environment (optional but recommended):**\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows, use `venv\\Scripts\\activate`\n   ```\n\n3. **Install dependencies:**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Set up `.env` file for API key:**\n   Create a `.env` file in the root directory and add your Gemini API key:\n   ```plaintext\n   GOOGLE_API_KEY=your_gemini_api_key\n   ```\n\n5. **Configure Tesseract OCR Path:**\n   Update the path to `tesseract.exe` in `app.py`:\n   ```python\n   pytesseract.pytesseract.tesseract_cmd = r'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'  # Update if needed\n   ```\n\n### Usage\n\n1. **Run the application:**\n   ```bash\n   streamlit run app.py\n   ```\n\n2. **Upload PDF or Image**:\n   - Go to the sidebar to upload a PDF or image.\n   - The app will extract text and display it in the sidebar.\n\n3. **Interact with Chat**:\n   - Ask questions about the uploaded content, and the chatbot will generate responses based on extracted text.\n\n### File Structure\n\n```\nChatWithPdf-Images/\n├── app.py                # Main application file\n├── requirements.txt      # Python dependencies\n└── .env                  # Contains the Gemini API key\n```\n\n## Screenshots\n\nHere are some screenshots to give you a glimpse of the app's interface and functionality:\n![Screenshot 2024-10-24 212659](https://github.com/user-attachments/assets/44b98534-7b22-4541-a268-56eb5ecfe9e0)\n![Screenshot 2024-10-24 212907](https://github.com/user-attachments/assets/c2431c96-12e4-4d22-b49d-c98e34ddec33)\n![Screenshot 2024-10-24 213032](https://github.com/user-attachments/assets/b75b8c8a-57da-49d2-a384-d23a727f8320)\n\n\n\n## Dependencies\n\nRefer to `requirements.txt` for all dependencies, including:\n- `streamlit`\n- `PyPDF2`\n- `Pillow`\n- `pytesseract`\n- `google-generativeai`\n- `langchain`\n\n## Acknowledgements\n- Thanks to [Google Generative AI (Gemini API)](https://cloud.google.com/generative-ai) for the content generation capability.\n- Icons and animations inspired by CSS libraries.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahil352005%2Fchatwithpdf-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsahil352005%2Fchatwithpdf-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahil352005%2Fchatwithpdf-images/lists"}