SmartHire is a smart, AI-powered resume screening app that automates the tedious recruitment process. It fetches resumes directly from Gmail, extracts their content, analyzes them using Google Gemini, and helps recruiters shortlist the most suitable candidates ā all from an intuitive Streamlit dashboard.
Tool/Library | Purpose |
---|---|
Streamlit | Frontend & UI rendering |
Google Gemini API | AI-powered resume understanding |
Gmail API | Fetching attachments from Gmail |
MongoDB (Atlas) | Database for job descriptions and resumes |
pdfminer.six | Extract text from PDF files |
python-docx | Extract text from DOCX files |
dotenv | Manage environment variables |
cryptography | Encrypt/decrypt sensitive data |
Plotly | Interactive charts |
āāā ai_recruiter_app.py # Main Streamlit app
āāā requirements.txt # Python dependencies
āāā credentials.json # Gmail OAuth client credentials (keep secret)
āāā .env # Environment variables (never push to GitHub)
āāā .streamlit/
ā āāā config.toml # Streamlit UI config (optional)
āāā README.md
git clone https://github.com/yourusername/smarthire-ai.git cd smarthire-ai
Bash (Linux/macOS/Git Bash):
python -m venv venv
source venv/bin/activate
Windows CMD:
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
Create a file named .env in the root directory and add:
GOOGLE_API_KEY=your_google_gemini_api_key
MONGO_URI=mongodb+srv://<username>:<password>@<cluster-url>/smart_hire?retryWrites=true&w=majority
GMAIL_QUERY=label:CVs
GMAIL_SCOPES=https://www.googleapis.com/auth/gmail.readonly
Save your Gmail OAuth credentials as:
credentials.json
ā ļø Do not share this file publicly.
streamlit run app.py
Push your code to GitHub
Go to Streamlit Cloud
Click "New App"
Choose your repo and select app.py
Go to Secrets tab and add the following:
GOOGLE_API_KEY = your_google_gemini_api_key
MONGO_URI = mongodb+srv://...
GMAIL_QUERY = label:CVs
GMAIL_SCOPES = https://www.googleapis.com/auth/gmail.readonly
GOOGLE_CLIENT_SECRET = """
<contents of credentials.json>
"""
streamlit
google-auth
google-auth-oauthlib
google-auth-httplib2
google-api-python-client
python-dotenv
pdfminer.six
python-docx
pymongo
cryptography
plotly
google-generativeai
This project is licensed under the MIT License.
Feel free to use, modify, and distribute with attribution.