Spaces:
Configuration error
Download README.md from dkshah/mypythonapp: direct link, hf CLI and curl.
- Browser
- Download file 3.12 kB
-
https://huggingface.co/spaces/dkshah/mypythonapp/resolve/main/README.md
- Command line
-
hf download hf://spaces/dkshah/mypythonapp/README.md
-
curl -L -o README.md https://huggingface.co/spaces/dkshah/mypythonapp/resolve/main/README.md
Resume Parser & Summarizer (Streamlit + Hugging Face)
A Streamlit web app that parses resumes (PDF/DOCX) and generates an AI summary using the Hugging Face Inference API. It extracts contact details and detected skills and produces a concise summary.
Features
- Upload resumes in PDF or DOCX
- Extract contact information (email, phone)
- Detect common technical skills via keyword scan
- Summarize resume content using a Hugging Face summarization model
- Streamlit UI with sidebar for HF model and API token
Local Installation
Clone the repository:
git clone <repository-url> cd windsurf-project-2Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activateInstall the required packages:
pip install -r requirements.txt(Optional) Set your Hugging Face token for higher rate limits:
# Windows (PowerShell) setx HF_TOKEN "hf_XXXXXXXXXXXXXXXXXXXXXXXXXXXX" # macOS/Linux export HF_TOKEN="hf_XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Usage
Run the Streamlit application:
streamlit run app.pyOpen your web browser and navigate to
http://localhost:8501Upload a resume file (PDF or DOCX) using the file uploader
In the sidebar, set the summarization model (default:
facebook/bart-large-cnn) and provide your HF API token if not set as a secret or environment variable.View extracted info and the AI-generated summary.
Hugging Face Inference API
This app uses the Hugging Face Inference API via huggingface-hub to run text summarization. You can choose a model such as:
facebook/bart-large-cnn(default)sshleifer/distilbart-cnn-12-6(faster, smaller)
You may supply an API token via any of the following (priority order):
st.secrets["HF_TOKEN"]- Environment variable
HF_TOKEN - Sidebar password input
Create a token at: https://huggingface.co/settings/tokens
Deploy to Hugging Face Spaces
- Create a new Space at https://huggingface.co/spaces and choose "Streamlit" as the SDK.
- Push your repository files (ensure
app.pyandrequirements.txtare present). - In the Space, go to Settings → Secrets and add:
- Key:
HF_TOKEN - Value: your Hugging Face token
- Key:
- The app will build automatically. Once running, you can change models from the sidebar.
Notes:
- Keep dependencies minimal for faster builds (see
requirements.txt). - Uploaded files are kept in the Space runtime; do not rely on persistence across restarts.
Dependencies
- Python 3.9+
- Streamlit
- PyPDF2
- python-docx
- huggingface-hub
License
This project is licensed under the MIT License - see the LICENSE file for details.
Notes & Next Steps
This is a lightweight implementation designed to run well on Hugging Face Spaces. Ideas to extend:
- Use a custom summarization prompt or instruction-tuned models.
- Add job description matching and scoring.
- Export parsed data to CSV/JSON.
- Improve skill/entity extraction with advanced NLP if needed.