Spaces:
Sleeping
Sleeping
File size: 2,185 Bytes
7cbc820 06f8d6f 153f2a7 e811837 153f2a7 7cbc820 153f2a7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | ---
title: CV-Extractor
emoji: 📸
sdk: streamlit
sdk_version: 1.37.1
app_file: app.py
---
# CV Analyzer (AI-Powered Resume Parser)
A Streamlit-based app that extracts structured data from CVs (PDF) using **Docling + Agentic AI + Pydantic schema**, and converts it into a clean, downloadable CSV.
---
## Features
- Upload CV (PDF)
- Parse document using Docling
- Extract structured data using LLM agent
- Validate with Pydantic schema
- Convert to Pandas DataFrame
- View extracted data in UI
- Download as CSV
---
## Tech Stack
- **Streamlit** – UI
- **Docling** – PDF parsing
- **Pydantic / pydantic-ai** – structured extraction
- **Hugging Face / LLM** – inference
- **Pandas** – data processing
---
## Setup
### 1. Clone repo
```bash
git clone https://github.com/your-username/cv-analyzer.git
cd cv-analyzer
````
### 2. Create virtual environment
```bash
python -m venv .venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows
```
### 3. Install dependencies
```bash
pip install -r requirements.txt
```
### 4. Environment variables
Create a `.env` file:
```
HF_TOKEN=your_huggingface_token
```
> `.env` is ignored via `.gitignore`
---
## Run App
```bash
streamlit run app.py
```
---
## How it works
1. User uploads CV (PDF)
2. Docling converts PDF → structured text/markdown
3. LLM agent extracts data using predefined schema
4. Output is validated via Pydantic
5. Data is converted into a DataFrame
6. User can view and download CSV
---
## Notes
* Schema is designed for **AI/ML-focused resumes**
* Missing fields are returned as `null` (no hallucination policy)
* Dates are stored as strings to avoid parsing errors
* Validation is relaxed to improve LLM compatibility
---
## Limitations
* LLM may still produce inconsistent outputs for poorly formatted CVs
* Complex layouts (tables, multi-column PDFs) may affect parsing quality
* Requires internet access for model inference
---
## Future Improvements
* Multi-CV batch processing
* Candidate scoring & ranking
* Semantic search over resumes (FAISS)
* UI improvements (filters, charts)
* Export to JSON / Excel
---
## License
MIT License
```
``` |