docs: README.md
Browse files- README.md +180 -1
- main.py +3 -3
- tests/conftest.py +1 -1
- tests/test_base.py +1 -1
README.md
CHANGED
@@ -1 +1,180 @@
|
|
1 |
-
# Automated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Automated Interview Filtering
|
2 |
+
|
3 |
+
## Overview
|
4 |
+
The HR Interview Analysis System is an AI-powered tool that helps HR professionals streamline their interview process through automated analysis of video interviews, resumes, and candidate responses. The system leverages multiple AI technologies including emotion detection, speech-to-text conversion, and natural language processing to provide comprehensive candidate assessments.
|
5 |
+
|
6 |
+
## Architecture
|
7 |
+
The project follows a clean, **layered monolith architecture**:
|
8 |
+
|
9 |
+
```
|
10 |
+
src/
|
11 |
+
├── domain/ # Core business logic and entities
|
12 |
+
├── service/ # Use cases and business rules
|
13 |
+
├── frontend/ # UI and API interfaces
|
14 |
+
└── utils/ # Helper functions and utilities
|
15 |
+
tests/
|
16 |
+
└── integration/ # Integration tests
|
17 |
+
```
|
18 |
+
|
19 |
+
### Key Components
|
20 |
+
- **Domain Layer**: Contains business entities, value objects, and enums
|
21 |
+
- **Service Layer**: Core business logic and use cases
|
22 |
+
- LangChain for LLM integration
|
23 |
+
- DeepFace for emotion analysis
|
24 |
+
- Google Speech-to-Text for audio transcription
|
25 |
+
- LlamaParse for resume parsing
|
26 |
+
- **Frontend Layer**: Gradio-based user interface
|
27 |
+
- **Utils**: Helper functions and utilities
|
28 |
+
|
29 |
+
## Technologies Used
|
30 |
+
- **Frontend**: Gradio
|
31 |
+
- **AI/ML**:
|
32 |
+
- LangChain for LLM operations
|
33 |
+
- DeepFace for facial emotion analysis
|
34 |
+
- Google Speech-to-Text API
|
35 |
+
- LlamaParse for resume parsing
|
36 |
+
- **Development Tools**:
|
37 |
+
- Python 3.9+
|
38 |
+
- Black for code formatting
|
39 |
+
- pytest for testing
|
40 |
+
- pre-commit hooks
|
41 |
+
|
42 |
+
## Prerequisites
|
43 |
+
- Python 3.9 or higher
|
44 |
+
- pip package manager
|
45 |
+
- Git
|
46 |
+
|
47 |
+
## Installation
|
48 |
+
|
49 |
+
1. Clone the repository:
|
50 |
+
```bash
|
51 |
+
git clone https://github.com/your-username/hr-interview-analyzer.git
|
52 |
+
cd hr-interview-analyzer
|
53 |
+
```
|
54 |
+
|
55 |
+
2. Create and activate virtual environment:
|
56 |
+
```bash
|
57 |
+
python -m venv venv
|
58 |
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
59 |
+
```
|
60 |
+
|
61 |
+
3. Install dependencies:
|
62 |
+
```bash
|
63 |
+
pip install -r requirements.txt
|
64 |
+
```
|
65 |
+
|
66 |
+
4. Set up environment variables:
|
67 |
+
```bash
|
68 |
+
cp .env.example .env
|
69 |
+
# Edit .env with your API keys and configurations
|
70 |
+
```
|
71 |
+
|
72 |
+
## Development Setup
|
73 |
+
|
74 |
+
### Code Formatting
|
75 |
+
We use Black for code formatting. To set up:
|
76 |
+
|
77 |
+
1. Install pre-commit hooks:
|
78 |
+
```bash
|
79 |
+
pre-commit install
|
80 |
+
```
|
81 |
+
|
82 |
+
2. Run Black manually:
|
83 |
+
```bash
|
84 |
+
black .
|
85 |
+
```
|
86 |
+
|
87 |
+
3. Configure VS Code (optional):
|
88 |
+
```json
|
89 |
+
{
|
90 |
+
"python.formatting.provider": "black",
|
91 |
+
"editor.formatOnSave": true
|
92 |
+
}
|
93 |
+
```
|
94 |
+
|
95 |
+
### Git Workflow
|
96 |
+
|
97 |
+
#### Creating a New Branch
|
98 |
+
```bash
|
99 |
+
# Update main branch
|
100 |
+
git checkout main
|
101 |
+
git pull origin main
|
102 |
+
|
103 |
+
# Create new feature branch
|
104 |
+
git checkout -b feature/your-feature-name
|
105 |
+
```
|
106 |
+
|
107 |
+
#### Making Changes
|
108 |
+
```bash
|
109 |
+
# Stage changes
|
110 |
+
git add .
|
111 |
+
|
112 |
+
# Commit changes
|
113 |
+
git commit -m "feat: your descriptive commit message"
|
114 |
+
|
115 |
+
# Push to remote
|
116 |
+
git push origin feature/your-feature-name
|
117 |
+
```
|
118 |
+
|
119 |
+
### Running the Application
|
120 |
+
|
121 |
+
#### Starting Gradio Interface
|
122 |
+
```bash
|
123 |
+
python -m src.presentation.gradio.interface
|
124 |
+
```
|
125 |
+
The interface will be available at `http://localhost:7860`
|
126 |
+
|
127 |
+
#### Running Tests
|
128 |
+
```bash
|
129 |
+
# Run all tests
|
130 |
+
pytest
|
131 |
+
|
132 |
+
# Run specific test file
|
133 |
+
pytest tests/unit/test_interview_analyzer.py
|
134 |
+
|
135 |
+
# Run with coverage
|
136 |
+
pytest --cov=src tests/
|
137 |
+
```
|
138 |
+
|
139 |
+
## Configuration
|
140 |
+
|
141 |
+
### Environment Variables
|
142 |
+
```env
|
143 |
+
OPENAI_API_KEY=your_key_here
|
144 |
+
GOOGLE_SPEECH_KEY=your_key_here
|
145 |
+
LLAMAPARSE_API_KEY=your_key_here
|
146 |
+
```
|
147 |
+
|
148 |
+
### Supported File Formats
|
149 |
+
- Video: MP4, AVI, MOV, WMV
|
150 |
+
- Resume: PDF, DOCX, DOC, TXT
|
151 |
+
|
152 |
+
## Error Handling
|
153 |
+
The system implements comprehensive error handling for:
|
154 |
+
- Invalid file formats
|
155 |
+
- API failures
|
156 |
+
- Resource limitations
|
157 |
+
- Processing errors
|
158 |
+
|
159 |
+
## Contributing
|
160 |
+
1. Fork the repository
|
161 |
+
2. Create your feature branch
|
162 |
+
3. Commit your changes
|
163 |
+
4. Push to the branch
|
164 |
+
5. Create a Pull Request
|
165 |
+
|
166 |
+
### Commit Message Format
|
167 |
+
```
|
168 |
+
[<type>]: <subject>
|
169 |
+
|
170 |
+
[<body>]
|
171 |
+
|
172 |
+
[<footer>]
|
173 |
+
```
|
174 |
+
Types:
|
175 |
+
- feat: New feature
|
176 |
+
- fix: Bug fix
|
177 |
+
- docs: Documentation
|
178 |
+
- style: Formatting
|
179 |
+
- refactor: Code restructuring
|
180 |
+
|
main.py
CHANGED
@@ -6,11 +6,11 @@
|
|
6 |
|
7 |
def print_hi(name):
|
8 |
# Use a breakpoint in the code line below to debug your script.
|
9 |
-
print(f
|
10 |
|
11 |
|
12 |
# Press the green button in the gutter to run the script.
|
13 |
-
if __name__ ==
|
14 |
-
print_hi(
|
15 |
|
16 |
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
|
|
|
6 |
|
7 |
def print_hi(name):
|
8 |
# Use a breakpoint in the code line below to debug your script.
|
9 |
+
print(f"Hi, {name}") # Press ⌘F8 to toggle the breakpoint.
|
10 |
|
11 |
|
12 |
# Press the green button in the gutter to run the script.
|
13 |
+
if __name__ == "__main__":
|
14 |
+
print_hi("PyCharm")
|
15 |
|
16 |
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
|
tests/conftest.py
CHANGED
@@ -11,4 +11,4 @@ def go_to_tmpdir(request):
|
|
11 |
sys.path.insert(0, str(tmpdir))
|
12 |
# Chdir only for the duration of the test.
|
13 |
with tmpdir.as_cwd():
|
14 |
-
yield
|
|
|
11 |
sys.path.insert(0, str(tmpdir))
|
12 |
# Chdir only for the duration of the test.
|
13 |
with tmpdir.as_cwd():
|
14 |
+
yield
|
tests/test_base.py
CHANGED
@@ -2,4 +2,4 @@ from project_name.base import NAME
|
|
2 |
|
3 |
|
4 |
def test_base():
|
5 |
-
assert NAME == "project_name"
|
|
|
2 |
|
3 |
|
4 |
def test_base():
|
5 |
+
assert NAME == "project_name"
|