임동진 | 정재윤 | 조설아 | 허치영 | 이보림 |
---|---|---|---|---|
Github | Github | Github | Github | Github |
임동진
: Dialogue Summarization • Backend • Product Serving
정재윤
: Dataset Processing • Frontend
조설아
: Text-to-Image • Text processing
허치영
: Dialogue Summarization • Documentation
이보림
: Text-to-Image • Image Dataset
채팅 로그 요약문으로 단체카톡방 대표 이미지를 생성해주는 ChatDALL-E
-
각 채팅방의 특징을 잘 표현하는 대표 이미지 생성
-
채팅방 혼동으로 인해 의도와 다른 채팅방에 메시지를 잘못 전송하는 경우를 방지하기 위함
-
최근 대화 내역의 요약 문장 제공
-
최근 대화 내역 요약 문장을 나타내는 이미지 제공
.
├── summarization - model for dialogue summarization
│ └── ...
├── text2image - model for text-to-image (minDALL-E)
│ └── ...
|-- README.md
|-- app.py - Frontend Service
|-- main.py - Backend Service
|-- requirements.txt
|-- client.json - Papago API ID & Key
└── service - methods for frontend/backend
|-- __init__.py
|-- back_function.py - Backend Method
|-- front_function.py - Frontend Method
|-- text_to_image.py - Text to Image Model Method
└── utils - Modules required to load the minDALL-E
|-- __init__.py
|-- config.py
|-- vqgan_layer.py
|-- transfomer_layer.py
|-- sampling.py
|-- tokenizer.py
|-- transformer.py
|-- utils.py
└── vqgan.py
pip install -r requirements.txt --use-feature=2020-resolver
- use-feature : Library dependency resolver를 위한 argument
streamlit run app.py
uvicorn main:app
-
text2image/model/tf_model/model/
- Fine-tuning 시킨 minDALL-E의 Parameter 저장
-
service/
- Service에 활용할 minDALL-E Parameter 저장 공간
- Python
from transformers import BartForConditionalGeneration
model_name = 'chi0/kobart-dial-sum'
model = BartForConditionalGeneration.from_pretrained(model_name)
-
Huggingface Model
- Google Cloud Platform
- 활용 이유 1 : 무료로 GPU를 활용하기에 최적인 Cloud Platform
- 활용 이유 2 : Machine Learning을 위한 환경을 자동으로 구성해주는 기능 존재
-
Machine 유형 : n1-standard-4
- vCPU : 4
- Memory : 15GB
- CPU 플랫폼 : Intel Haswell
- File 시스템 공간
-
GPU : NVIDIA Tesla T4 1개
- Tesla T4 사양 : https://www.nvidia.com/ko-kr/data-center/tesla-t4/
-
HTTP 및 HTTPS 트래픽 활용
-
Port : 8501을 제외한 모든 포트는 외부에서 통과 불가능하도록 설정
-
pip install -r requirements.txt --use-feature=2020-resolver
- pip이 설치 되어 있지 않다면 pip 설치가 선행되어야
-
service directory, main.py, app.py를 Cloud에 Load함
-
Fine-Tuning 시킨 Text to Image 모델에 대해 저장된 State들을 service 폴더 아래에 저장함
-
main.py의
txt2imgModel,_ = Rep_Dalle.from_pretrained({HERE})
부분에서 {HERE}에 Model State를 저장한 경로를 넣어줌 -
Papago API에서 번역 API를 신청한 후, API ID 및 Private Key를 client.json 파일에 넣어줌
- client.json 형식
{ "client_id":{Papago API ID}, "client_secret":{Papago API Key} }
-
nohup uvicorn main:app &
nohup streamlit run app.py &
- Cloud에서 app.py 및 main.py를 실행시킴으로써 24시간 사이트를 활용할 수 있도록 배포하면 됨
- 최종 Product Servin Site :
{Cloud IP 주소}:8501
- Ham, Jiyeon, et al. "Kornli and korsts: New benchmark datasets for korean natural language understanding." arXiv preprint arXiv:2004.03289 (2020).
- Lewis, Mike, et al. "Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension." arXiv preprint arXiv:1910.13461 (2019).
- Liu, Zhengyuan, and Nancy F. Chen. "Controllable Neural Dialogue Summarization with Personal Named Entity Planning." arXiv preprint arXiv:2109.13070 (2021).
- Lee, Dongyub, et al. "Reference and document aware semantic evaluation methods for Korean language summarization." arXiv preprint arXiv:2005.03510 (2020).
- Ramesh, Aditya, et al. "Zero-shot text-to-image generation." International Conference on Machine Learning. PMLR, 2021.
- Zhou, Yufan, et al. "LAFITE: Towards Language-Free Training for Text-to-Image Generation." arXiv preprint arXiv:2111.13792 (2021).
- Rombach, Robin, et al. "High-Resolution Image Synthesis with Latent Diffusion Models." arXiv preprint arXiv:2112.10752 (2021).