An open API service indexing awesome lists of open source software.

https://github.com/jeon-jinhyeok/llmdiary

Emotion Analysis Diary Using LLM
https://github.com/jeon-jinhyeok/llmdiary

diary django kobert llm postgresql

Last synced: 28 days ago
JSON representation

Emotion Analysis Diary Using LLM

Awesome Lists containing this project

README

        

# πŸ“– LLM Diary: 감정 뢄석 기반 닀이어리 ν”Œλž«νΌ

![Apache 2.0][license-shield]
![Python](https://img.shields.io/badge/Python-3.10-blue?style=flat&logo=python&logoColor=white)
![Django](https://img.shields.io/badge/Django-5.1-lightblue?logo=django&logoColor=white&labelColor=green)
![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16-blue?logo=postgresql&logoColor=Blue&labelColor=Blue)
![TailwindCSS][tailwind-shield]
[![Hugging Face Model](https://img.shields.io/badge/HuggingFace-Model-yellow?logo=huggingface)](https://huggingface.co/xxhyeok/koBERT-emotion)
![Docker](https://img.shields.io/badge/Docker-Supported-blue?style=flat&logo=docker&logoColor=white&labelColor=black)



## πŸ“Œ Table of Contents
- [πŸ” About the Project](#-about-the-project)
- [πŸš€ Features](#-features)
- [πŸ’» Technologies](#-technologies)
- [πŸ›  Getting Started](#-getting-started)
- [πŸ“Œ Usage](#-usage)
- [πŸ“§ Contact](#-contact)
- [πŸ“œ License](#-license)

## πŸ” About the Project
κ±°λŒ€ μ–Έμ–΄ λͺ¨λΈ(LLM)을 μ‚¬μš©ν•˜μ—¬ μ‚¬μš©μžμ˜ 일기λ₯Ό λ°”νƒ•μœΌλ‘œ 감정을 λΆ„μ„ν•˜κ³ , μ‚¬μš©μžμ—κ²Œ 감정 톡계 및 λ§žμΆ€ν˜• 상담을 μ œμ•ˆν•˜λŠ” μ‹œμŠ€ν…œ.

## πŸš€ Features
### 🏷️ROLE
- **User**
- **Counselor**
- **Admin**
- **UserSupporter**

### πŸ“Š Emotion Analsis
- **Model**: [koBERT](https://huggingface.co/monologg/kobert).
- **Fine-tuning Dataset**: [κ°μ„±λŒ€ν™” λ§λ­‰μΉ˜](https://aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&aihubDataSe=data&dataSetSn=86)
- **Emotion** : λΆ„λ…Έ, μŠ¬ν””, λΆˆμ•ˆ, μƒμ²˜, λ‹Ήν™©, 기쁨

### πŸ₯ Counsel
- User can request a consultation, view connselor info
- Counselor can schedule, conduct, suggest consultations.

## πŸ’» Technologies
- [Python](https://www.python.org) 3.10.0
- [Django](https://www.djangoproject.com/) 5.1.3
- [tailwindcss](https://tailwindcss.com/) 3.4.14
- [transformers](https://huggingface.co/docs/transformers/ko/index) 4.47.0

## πŸ›  Getting Started
### 0️⃣ Pre-requisite
The easiest way to start the LLMDiary is through **docker compose**. Before running this with the following commands, make sure that [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/install/) are installed on your machine:

### 1️⃣ Clone the Repository
```bash
git clone https://github.com/Jeon-Jinhyeok/LLMDiary.git
cd LLMDiary
```
### 2️⃣ Download the Model (Hugging Face)
```bash
sudo apt install git-lfs
git lfs clone https://huggingface.co/xxhyeok/koBERT-emotion
```
> πŸ’‘ **μ°Έκ³ :** Hugging Face λͺ¨λΈ μ €μž₯μ†Œμ— μ ‘κ·Όν•˜λ €λ©΄ SSHλ₯Ό μ΄μš©ν•œ 둜그인 인증이 ν•„μš”ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
> [Hugging Face SSH Key μ„€μ • κ°€μ΄λ“œ](https://huggingface.co/docs/hub/security-tokens) μ°Έκ³ 
### 3️⃣ Configure Environment Variables
- setup.env파일 μˆ˜μ •
```ini
POSTGRES_DB=emotion_diary_db
POSTGRES_USER=admin
POSTGRES_PASSWORD=your-password
POSTGRES_HOST=db
POSTGRES_PORT=5432
DJANGO_SECRET_KEY=your-secret-key
DEBUG=False
ALLOWED_HOSTS=*
```
- setup.env 파일 적용
```bash
source ./setup.env
```

### 4️⃣ Run with Docker
```bash
docker compose up
```
### 5️⃣ Access the Web Interface
```plaintext
http://localhost:8000
```

## πŸ“Œ Usage

### Login Page
image

---

### Diary List with Representative emotion
image

---

### Diary Details

image

- Diary Details with Result of Emotion Analysis and Recommended Action
- You can edit or delete the written diary.

---

### Home
image

- You can check latest Diaries in Home
- You can check emotional statistics for one week.

## πŸ“§ Contact
- [Jinhyeok, JEON](https://github.com/Jeon-Jinhyeok) - [email protected]
- [Donggeon, KIM](https://github.com/ehdrjs6831) -

## πŸ“œ License
Apache 2.0

---

[license-shield]: https://img.shields.io/badge/license-Apache%202.0-blue?style=round
[repository-size-shield]: https://img.shields.io/github/repo-size/dev-ujin/readme-template?labelColor=D8D8D8&color=BE81F7
[django-shield]: "https://img.shields.io/badge/django-092E20?style=flat-square&logo=django&logoColor=white"
[tailwind-shield]: https://img.shields.io/badge/TailwindCSS-38B2AC?style=flat-square&logo=tailwind-css&logoColor=white