File size: 4,140 Bytes
b1962a5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
124
125
126
127
---
license: apache-2.0
title: Chatbotv2
sdk: gradio
colorTo: blue
---
# HRMS Email Automation & Legal Assistant Chatbot

## Overview
This repository contains three separate applications:
1. **HRMS Email Automation** - A Streamlit-based application for automating HR interview invitation emails.
2. **Legal Assistant Chatbot** - A Streamlit-based chatbot leveraging Retrieval-Augmented Generation (RAG) for legal assistance.
3. **Employee Performance & Retention Analytics Dashboard** - A Streamlit-based analytics dashboard providing insights into employee attrition, performance, and retention risk.

---

## 1️⃣ HRMS Email Automation

### Description
The **HRMS Email Automation** tool simplifies the process of sending interview invitations via email. It provides a user-friendly form to collect candidate details and automatically sends emails for both **Online** and **Face-to-Face** interviews.

### Features
- Select interview type: **Online** or **Face-to-Face**.
- Input relevant details like candidate name, interview time, PIC (Person in Charge), and contact details.
- Validate form fields to ensure required details are entered.
- Send email automatically using the `EmailAuto` class.
- User-friendly interface built with **Streamlit**.

### Installation & Usage
```sh
# Clone the repository
git clone https://github.com/your-repo.git
cd your-repo

# Install dependencies
pip install -r requirements.txt

# Run the Streamlit app
streamlit run email_ui.py
```

### File Structure
```
β”œβ”€β”€ automation/
β”‚   β”œβ”€β”€ emailAuto.py  # Handles email automation
β”œβ”€β”€ email_ui.py  # Streamlit UI for HRMS Email Automation
```

---

## 2️⃣ Legal Assistant Chatbot

### Description
The **Legal Assistant Chatbot** is a chatbot designed to provide legal assistance by retrieving relevant legal context from **Pinecone** and responding based on a fine-tuned **TinyLlama** model.

### Features
- Uses **Retrieval-Augmented Generation (RAG)** for context-aware legal responses.
- Retrieves legal documents from **Pinecone** to enhance responses.
- Fine-tuned **TinyLlama-1.1B-Chat** model for legal domain understanding.
- Interactive chat interface built with **Gradio**.
- Supports file uploads (optional).

### Installation & Usage
```sh
# Install dependencies
pip install -r requirements.txt

# Run the chatbot
python app.py
```

### File Structure
```
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ train.py  # Handles model training
β”‚   β”œβ”€β”€ rag.py  # Handles Pinecone-based retrieval
β”œβ”€β”€ app.py  # Gradio UI for the Legal Assistant Chatbot
```

---

## 3️⃣ Employee Performance & Retention Analytics Dashboard

### Description
The **Employee Performance & Retention Analytics Dashboard** provides insights into employee attrition, performance, and retention risk. It includes interactive visualizations, ML-based attrition predictions, and employee-specific evaluations.

### Features
- **Attrition Prediction:** Uses a RandomForest model to predict employee attrition likelihood.
- **Performance Analysis:** Visualizations of performance rating, salary, and tenure.
- **Retention Analysis:** Highlights risks based on job satisfaction, work-life balance, and promotion history.
- **Employee Evaluation:** Individual employee performance and retention insights.
- **AI-Powered Insights:** Generates department-specific insights based on filtered employee data.

### Installation & Usage
```sh
# Install dependencies
pip install -r requirements.txt

# Run the Streamlit dashboard
streamlit run dashboard.py
```

### File Structure
```
β”œβ”€β”€ dashboard.py  # Streamlit UI for HR analytics
β”œβ”€β”€ HR-Employee-Attrition.csv  # Employee dataset
```

---

## Environment Variables
Both applications require environment variables to function correctly. Create a `.env` file and add the following:
```
PINECONE_API_KEY=your_pinecone_api_key
PINECONE_INDEX=your_pinecone_index
PINECONE_NAMESPACE=your_pinecone_namespace
```

---

## Contribution
Feel free to contribute to this project by submitting issues, pull requests, or feature suggestions!

---

## License
This project is licensed under the MIT License.