{"id":29563692,"url":"https://github.com/no0bitah/cover-letter-generator","last_synced_at":"2025-10-08T10:13:16.985Z","repository":{"id":304914246,"uuid":"1020511946","full_name":"No0Bitah/cover-letter-generator","owner":"No0Bitah","description":"A Streamlit-powered cover letter generator that uses Ollama AI to create personalized cover letters from resume and job description files. Features real-time customization, multiple file format support (PDF, DOCX, TXT), and an interactive chat interface for further personalization.","archived":false,"fork":false,"pushed_at":"2025-07-16T06:01:48.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-17T03:45:41.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/No0Bitah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-07-16T01:54:40.000Z","updated_at":"2025-07-16T06:01:51.000Z","dependencies_parsed_at":"2025-07-17T09:02:08.602Z","dependency_job_id":"3fb5af91-ee09-4446-ba65-92de3fb28326","html_url":"https://github.com/No0Bitah/cover-letter-generator","commit_stats":null,"previous_names":["no0bitah/cover-letter-generator"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/No0Bitah/cover-letter-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/No0Bitah%2Fcover-letter-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/No0Bitah%2Fcover-letter-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/No0Bitah%2Fcover-letter-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/No0Bitah%2Fcover-letter-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/No0Bitah","download_url":"https://codeload.github.com/No0Bitah/cover-letter-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/No0Bitah%2Fcover-letter-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278925542,"owners_count":26069706,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"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":[],"created_at":"2025-07-18T18:36:44.025Z","updated_at":"2025-10-08T10:13:16.957Z","avatar_url":"https://github.com/No0Bitah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cover Letter Generator 📝\n\nA smart, personalized cover letter generator that leverages the power of Ollama's local LLM models to create tailored cover letters based on your resume and job descriptions.\n\n## 🌟 Features\n\n- **Smart Resume Processing**: Automatically extracts and cleans text from PDF, DOCX, and TXT files\n- **Multiple Input Methods**: Upload files or paste text directly\n- **Local LLM Integration**: Uses Ollama API for privacy-focused, local processing\n- **Real-time Personalization**: Interactive chat interface for further customization\n- **Professional Formatting**: Generates email-formatted cover letters with proper structure\n- **Typing Animation**: Smooth display of generated content\n- **Session Management**: Caches processed files to avoid reprocessing\n\n## 🛠️ Technology Stack\n\n- **Frontend**: Streamlit\n- **LLM**: Ollama API with Gemma:2b model\n- **PDF Processing**: PyMuPDF (fitz), custom extraction module\n- **Document Processing**: python-docx\n- **Backend**: Python 3.7+\n\n## 📋 Prerequisites\n\n1. **Ollama Installation**: Install Ollama on your system\n   ```bash\n   # Visit https://ollama.ai to download and install\n   ```\n\n2. **Model Setup**: Pull the Gemma:2b model\n   ```bash\n   ollama pull gemma:2b\n   ```\n\n3. **Python Dependencies**: Install required packages\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## 🚀 Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone \u003cyour-repository-url\u003e\n   cd cover-letter-generator\n   ```\n\n2. **Install dependencies**\n   ```bash\n   pip install streamlit requests PyMuPDF python-docx\n   ```\n\n3. **Start Ollama service**\n   ```bash\n   ollama serve\n   ```\n\n4. **Run the application**\n   ```bash\n   streamlit run letter_creator.py\n   ```\n\n## 📁 Project Structure\n\n```\ncover-letter-generator/\n├── letter_creator.py          # Main Streamlit application\n├── extract_resume.py          # PDF text extraction utilities\n├── resume_cleaner.py          # Resume text cleaning and processing\n├── requirements.txt           # Python dependencies\n└── README.md                 # Project documentation\n```\n\n## 🎯 Usage\n\n### Step 1: Upload Your Resume\n- Upload your resume file (PDF, DOCX, or TXT)\n- Or paste your resume text directly in the text area\n\n### Step 2: Add Job Description\n- Upload the job description file (PDF, DOCX, or TXT)\n- Or paste the job description text directly\n\n### Step 3: Generate Cover Letter\n- Click \"🚀 Generate Cover Letter\"\n- Wait for the AI to process and generate your personalized cover letter\n\n### Step 4: Personalize Further (Optional)\n- Use the chat interface to request modifications\n- Examples: \"Make it more formal\", \"Add emphasis on teamwork\", \"Make it shorter\"\n\n## ⚙️ Configuration\n\n### Ollama Settings\nYou can modify the Ollama configuration in `letter_creator.py`:\n\n```python\n# Default Ollama API endpoint\nOllama_API_URL = \"http://localhost:11434/api/generate\"\n\n# Model configuration\nMODEL_NAME = \"gemma:2b\"  # Change to your preferred model\n\n# Generation parameters\n\"temperature\": 0.7,  # Creativity level (0.0-1.0)\n\"top_p\": 0.9,       # Diversity control (0.0-1.0)\n```\n\n### Supported File Types\n- **PDF**: Processed using PyMuPDF with fallback extraction\n- **DOCX**: Microsoft Word documents\n- **TXT**: Plain text files\n\n## 🔧 Key Functions\n\n### `generate_cover_letter_prompt(resume_text, job_description)`\nCreates a comprehensive prompt for the LLM with specific instructions for:\n- Professional tone and format\n- Technology matching between resume and job description\n- Enthusiasm for learning new technologies\n- Concise, email-format output\n\n### `read_file(file, file_type)`\nHandles multiple file formats with intelligent processing:\n- PDF extraction with cleanup\n- DOCX paragraph extraction\n- TXT direct reading\n- Resume cleaning for type 0 (resume files)\n\n### `query_ollama(prompt)`\nCommunicates with the Ollama API:\n- Sends structured requests\n- Handles response parsing\n- Error handling and reporting\n\n### `display_text(response, typing_speed)`\nCreates an engaging user experience:\n- Typing animation effect\n- Professional styling\n- Session state management\n\n## 🎨 UI Features\n\n- **Sidebar Navigation**: Clean file upload and text input areas\n- **Real-time Feedback**: Success/error messages and loading spinners\n- **Responsive Design**: Professional styling with centered layout\n- **Interactive Chat**: Post-generation customization interface\n\n## 🛡️ Privacy \u0026 Security\n\n- **Local Processing**: All data processing happens locally using Ollama\n- **No Data Storage**: Files are processed in memory, not saved permanently\n- **Session-based**: Data exists only during your session\n\n## 🔍 Troubleshooting\n\n### Common Issues\n\n1. **Ollama Connection Error**\n   - Ensure Ollama is running: `ollama serve`\n   - Check if the model is installed: `ollama list`\n\n2. **File Processing Issues**\n   - Ensure files are not corrupted\n   - Check file size limitations\n   - Verify file format compatibility\n\n3. **Performance Issues**\n   - Consider using a more powerful model\n   - Adjust temperature and top_p parameters\n   - Ensure sufficient system resources\n\n## 📊 Performance Tips\n\n- **Model Selection**: Gemma:2b is efficient; consider larger models for better quality\n- **File Size**: Smaller files process faster\n- **Prompt Engineering**: The built-in prompt is optimized for best results\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature-name`\n3. Commit changes: `git commit -m 'Add feature'`\n4. Push to branch: `git push origin feature-name`\n5. Submit a pull request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## 🙏 Acknowledgments\n\n- [Ollama](https://ollama.ai) for providing local LLM capabilities\n- [Streamlit](https://streamlit.io) for the amazing web framework\n- [PyMuPDF](https://pymupdf.readthedocs.io/) for PDF processing\n\n## 📞 Support\n\nIf you encounter any issues or have questions:\n1. Check the troubleshooting section\n2. Review Ollama documentation\n3. Open an issue in the repository\n\n---\n\n**Made with by [No0Bitah](https://no0bitah.github.io/) 👋**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fno0bitah%2Fcover-letter-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fno0bitah%2Fcover-letter-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fno0bitah%2Fcover-letter-generator/lists"}