Skip to content

Commit ed978e7

Browse files
authored
Merge pull request #1 from rahulapjs/patch
feat: initialize project with Docker, Docker Compose, CI linting, and…
2 parents 2c7c509 + f44cb19 commit ed978e7

File tree

7 files changed

+154
-0
lines changed

7 files changed

+154
-0
lines changed

.dockerignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Git
2+
.git
3+
.gitignore
4+
5+
# Python
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
*.so
10+
.env
11+
.venv
12+
env/
13+
venv/
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
MANIFEST
30+
31+
# Streamlit
32+
.streamlit/

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GEMINI_API_KEY=your_gemini_api_key_here

.github/workflows/lint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Lint Code
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v3
11+
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: "3.10"
16+
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install flake8
21+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
22+
23+
- name: Lint with flake8
24+
run: |
25+
# stop the build if there are Python syntax errors or undefined names
26+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
27+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
28+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Use an official Python runtime as a parent image
2+
FROM python:3.10-slim
3+
4+
# Set the working directory in the container
5+
WORKDIR /app
6+
7+
# Copy the requirements file into the container
8+
COPY requirements.txt .
9+
10+
# Install any needed packages specified in requirements.txt
11+
RUN pip install --no-cache-dir -r requirements.txt
12+
13+
# Copy the rest of the application code
14+
COPY . .
15+
16+
# Expose the port Streamlit runs on
17+
EXPOSE 8501
18+
19+
# Define environment variable to prevent .pyc files
20+
ENV PYTHONDONTWRITEBYTECODE=1
21+
ENV PYTHONUNBUFFERED=1
22+
23+
# Command to run the application
24+
CMD ["streamlit", "run", "main.py", "--server.port=8501", "--server.address=0.0.0.0"]

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# ResumeParserAI
2+
3+
A Streamlit-based application that parses resumes (PDF) using Google Gemini AI to generate professional summaries and extract structured data.
4+
5+
## Features
6+
- **PDF Upload**: Upload your resume in PDF format.
7+
- **AI Analysis**: Uses Google Gemini Pro/Flash to analyze the content.
8+
- **Structured Extraction**: Extracts Name, Email, Location, Work Experience, Projects, Skills, and Education.
9+
- **Professional Summary**: Generates an engaging first-person summary.
10+
11+
## Prerequisites
12+
- Docker and Docker Compose installed on your machine.
13+
- A Google Gemini API Key.
14+
15+
## Getting Started
16+
17+
### 1. Clone the repository
18+
```bash
19+
git clone <repository-url>
20+
cd ResumeParserAI
21+
```
22+
23+
### 2. Environment Setup
24+
Create a `.env` file from the example:
25+
```bash
26+
cp .env.example .env
27+
```
28+
Open `.env` and add your Gemini API key:
29+
```
30+
GEMINI_API_KEY=your_actual_api_key_here
31+
```
32+
33+
### 3. Run with Docker Compose
34+
Start the application:
35+
```bash
36+
docker-compose up --build
37+
```
38+
Access the application at `http://localhost:8501`.
39+
40+
### 4. Run Locally (Optional)
41+
If you prefer running without Docker:
42+
```bash
43+
pip install -r requirements.txt
44+
streamlit run main.py
45+
```
46+
47+
## Project Structure
48+
- `main.py`: Main application logic.
49+
- `requirements.txt`: Python dependencies.
50+
- `Dockerfile`: Docker construction instructions.
51+
- `docker-compose.yml`: Container orchestration.

docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: '3.8'
2+
3+
services:
4+
resume-parser:
5+
build: .
6+
ports:
7+
- "8501:8501"
8+
env_file:
9+
- .env
10+
volumes:
11+
- .:/app
12+
environment:
13+
- GEMINI_API_KEY=${GEMINI_API_KEY}

requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
streamlit
2+
python-dotenv
3+
PyPDF2
4+
google-generativeai
5+
flake8

0 commit comments

Comments
 (0)