{"id":35035169,"url":"https://github.com/deepak5256/document-analyzer","last_synced_at":"2026-04-07T10:31:43.212Z","repository":{"id":325023791,"uuid":"1099518526","full_name":"deepak5256/document-analyzer","owner":"deepak5256","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-19T05:15:54.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-19T07:10:38.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/deepak5256.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":"2025-11-19T05:08:15.000Z","updated_at":"2025-11-19T05:15:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deepak5256/document-analyzer","commit_stats":null,"previous_names":["deepak5256/document-analyzer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/deepak5256/document-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepak5256%2Fdocument-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepak5256%2Fdocument-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepak5256%2Fdocument-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepak5256%2Fdocument-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepak5256","download_url":"https://codeload.github.com/deepak5256/document-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepak5256%2Fdocument-analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31509929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-12-27T07:50:28.232Z","updated_at":"2026-04-07T10:31:43.167Z","avatar_url":"https://github.com/deepak5256.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Document Analyzer - Gemini AI\r\n\r\nA Flask web application that uses Google Gemini AI to analyze various document types (PDF, Images, Word, PowerPoint, Text) and extract information with copy-to-clipboard functionality.\r\n\r\n## Features\r\n\r\n✅ **Multi-format Support**: Analyze PDFs, JPG, PNG, GIF, BMP, WebP, DOC, DOCX, PPT, PPTX, and TXT files\r\n✅ **AI-Powered Analysis**: Uses Google Gemini API for intelligent document analysis\r\n✅ **Copy Functionality**: Easily copy analysis results to clipboard\r\n✅ **Drag \u0026 Drop Upload**: Simple and intuitive file upload interface\r\n✅ **Beautiful UI**: Modern, responsive web interface\r\n✅ **Large File Support**: Handles up to 50MB files\r\n\r\n## Installation\r\n\r\n### Prerequisites\r\n\r\n- Python 3.8 or higher\r\n- Google Gemini API Key\r\n\r\n### Setup Steps\r\n\r\n1. **Clone or download the project**\r\n   ```\r\n   cd \"New folder\"\r\n   ```\r\n\r\n2. **Create a virtual environment** (recommended)\r\n   ```powershell\r\n   python -m venv venv\r\n   .\\venv\\Scripts\\Activate.ps1\r\n   ```\r\n\r\n3. **Install dependencies**\r\n   ```powershell\r\n   pip install -r requirements.txt\r\n   ```\r\n\r\n4. **Get your Gemini API Key**\r\n   - Visit: https://makersuite.google.com/app/apikey\r\n   - Create a new API key\r\n   - Copy the key\r\n\r\n5. **Set the API Key environment variable**\r\n   \r\n   **PowerShell:**\r\n   ```powershell\r\n   $env:GEMINI_API_KEY='your-api-key-here'\r\n   ```\r\n   \r\n   **Command Prompt:**\r\n   ```cmd\r\n   set GEMINI_API_KEY=your-api-key-here\r\n   ```\r\n   \r\n   **Or create a `.env` file** (optional):\r\n   ```\r\n   GEMINI_API_KEY=your-api-key-here\r\n   ```\r\n   \r\n   Then load it before running:\r\n   ```powershell\r\n   Get-Content .env | ForEach-Object {\r\n       $key, $value = $_ -split '=', 2\r\n       [Environment]::SetEnvironmentVariable($key, $value)\r\n   }\r\n   ```\r\n\r\n## Running the Application\r\n\r\n1. **Activate virtual environment** (if using one)\r\n   ```powershell\r\n   .\\venv\\Scripts\\Activate.ps1\r\n   ```\r\n\r\n2. **Set the API key** (if not already set)\r\n   ```powershell\r\n   $env:GEMINI_API_KEY='your-api-key-here'\r\n   ```\r\n\r\n3. **Run the application**\r\n   ```powershell\r\n   python app.py\r\n   ```\r\n\r\n4. **Open in browser**\r\n   - Navigate to: `http://localhost:5000`\r\n\r\n## How to Use\r\n\r\n1. Open the application in your web browser\r\n2. Click on the upload area or drag \u0026 drop a document\r\n3. Select a file (PDF, Image, Word, PowerPoint, or Text file)\r\n4. Click \"Analyze Document\" button\r\n5. Wait for the AI to analyze your document\r\n6. View the results and click \"📋 Copy All\" to copy the analysis to clipboard\r\n\r\n## File Format Details\r\n\r\n### Images (JPG, PNG, GIF, BMP, WebP)\r\n- Analyzes image content, text within images, and visual elements\r\n- Best for screenshots, diagrams, and photo documents\r\n\r\n### PDF\r\n- Converts first page to image and analyzes content\r\n- Extracts text and information from the document\r\n\r\n### Word Documents (DOCX)\r\n- Extracts all text content\r\n- Analyzes structure, paragraphs, and formatting\r\n\r\n### PowerPoint (PPTX)\r\n- Extracts text from all slides\r\n- Provides slide-by-slide analysis\r\n\r\n### Text Files (TXT)\r\n- Reads plain text content\r\n- Provides summary and key information\r\n\r\n## API Limits\r\n\r\n- **File Size**: Maximum 50MB per upload\r\n- **Free Tier**: Check Gemini API documentation for rate limits\r\n- **Processing Time**: Depends on file size and complexity\r\n\r\n## Troubleshooting\r\n\r\n### Error: \"GEMINI_API_KEY environment variable not set\"\r\n- Make sure you've set the API key environment variable correctly\r\n- Restart the application after setting the variable\r\n\r\n### Error: \"File type not allowed\"\r\n- Check that your file has the correct extension\r\n- Supported formats: PDF, JPG, JPEG, PNG, GIF, BMP, WebP, DOC, DOCX, PPT, PPTX, TXT\r\n\r\n### Error: \"Unable to process PDF\"\r\n- Install pdf2image: `pip install pdf2image`\r\n- On Windows, you may need: `pip install pdf2image pillow`\r\n\r\n### Connection Error\r\n- Make sure the Flask server is running\r\n- Check that you're accessing `http://localhost:5000`\r\n- Check firewall settings\r\n\r\n### API Rate Limit Error\r\n- Wait a few minutes before making another request\r\n- Check your Gemini API quota at https://makersuite.google.com\r\n\r\n## Project Structure\r\n\r\n```\r\nNew folder/\r\n├── app.py              # Main Flask application\r\n├── requirements.txt    # Python dependencies\r\n├── README.md          # This file\r\n├── templates/\r\n│   └── index.html     # Main HTML template\r\n├── static/\r\n│   ├── style.css      # Styling\r\n│   └── script.js      # Frontend JavaScript\r\n└── uploads/           # Temporary upload folder (auto-created)\r\n```\r\n\r\n## Security Notes\r\n\r\n- Files are processed and immediately deleted after analysis\r\n- No files are permanently stored on the server\r\n- All communication with Gemini API is encrypted\r\n- Uploaded files are not logged or tracked\r\n\r\n## Requirements\r\n\r\n- Flask 2.3.2\r\n- google-generativeai 0.3.0\r\n- Pillow 10.0.0\r\n- python-docx 0.8.11\r\n- python-pptx 0.6.21\r\n- pdf2image 1.16.3\r\n\r\n## Limitations\r\n\r\n- PDF analysis shows first page as image\r\n- For better OCR on PDFs, use image-based documents\r\n- Large documents may take longer to process\r\n- Some complex formatting may not be fully captured\r\n\r\n## License\r\n\r\nThis project is open source and available for personal and educational use.\r\n\r\n## Support\r\n\r\nFor issues with the Gemini API, visit: https://support.google.com/makersuite\r\n\r\n## Future Improvements\r\n\r\n- [ ] Multi-page PDF analysis\r\n- [ ] Document comparison\r\n- [ ] Extract specific data types (tables, images)\r\n- [ ] Support for more file formats\r\n- [ ] Export results as PDF/Word\r\n- [ ] Batch processing\r\n\r\n---\r\n\r\n**Made with ❤️ using Flask and Google Gemini AI**\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepak5256%2Fdocument-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepak5256%2Fdocument-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepak5256%2Fdocument-analyzer/lists"}