chatbotv2 / README.md
SF001-123456's picture
Update README.md
b1962a5 verified
---
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.