Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
8850cb2
chore: requirements.txt 추가
brothergiven Mar 18, 2025
4c04b67
chore: requirements.txt 수정
brothergiven Mar 18, 2025
518c4ac
feat: predict 엔드포인트 처리사항 구현 (#1)
brothergiven Mar 18, 2025
20b0e74
feat: Create Dockerfile
brothergiven Mar 19, 2025
1592ce9
refact: 프로젝트 디렉토리 구조 수정
brothergiven Mar 19, 2025
c5d98c3
feat: PyTorch 기반 모델 정의, 전처리 함수 수정 (#2)
brothergiven May 7, 2025
946ab79
refact: OCR 패키지 변경, torch 버전 변경 (#3)
brothergiven May 9, 2025
44d54f3
Update README.md
brothergiven May 9, 2025
da72ef6
feat: BLIP 모델 기반 이미지 Captioning 기능 구현 (#5)
brothergiven May 9, 2025
7f50336
chore: Update README.md
brothergiven May 9, 2025
45eb495
Update README.md
brothergiven May 9, 2025
08d7fbf
feat: Docker 및 cd 설정
brothergiven May 9, 2025
a6844a1
fix: cd 수정
brothergiven May 9, 2025
8f3e1c8
refact: 불필요 파일 삭제, dockerfile 수정
brothergiven May 9, 2025
0c49e20
fix: cd 수정
brothergiven May 9, 2025
3a1dada
docs: swagger 작성 (#6)
brothergiven May 10, 2025
ad8a67c
feat: 게임1 상호작용 기능 구현 (#7)
brothergiven May 10, 2025
bab46d9
feat: efficientnet 파인튜닝 model 학습 코드 작성 (#8)
brothergiven May 25, 2025
651d29f
fix: 요청/응답 메시지 포맷 수정
brothergiven May 25, 2025
44acd44
fix: cd.yml 수정
brothergiven May 25, 2025
113b8df
fix: Update cd.yml
brothergiven May 25, 2025
09e3a34
feat: 이미지 파일 직접 업로드 대신 S3 URL로 classifying
brothergiven May 27, 2025
404e246
feat: 추측 시작 메시지 받을 때 프롬프트 수정
brothergiven May 27, 2025
282ca73
feat: 추측 시작 시 메시지 받는 API 추가, DTO 수정
brothergiven May 27, 2025
5a22714
fix: 오류수정
brothergiven May 28, 2025
68815c4
fix: 응답 구조 수정
brothergiven May 31, 2025
8ede3fd
fix: GPT 버전 수정
brothergiven Jun 5, 2025
bf65dc2
feat: 클래스 명 한글로 수정
brothergiven Jun 6, 2025
0372efe
fix: 누락 클래스 추가
brothergiven Jun 6, 2025
81e7b52
fix: uvicorn timeout 시간 지정
brothergiven Jun 7, 2025
af4a006
feat: 루루 AI 클래스 작성
brothergiven Jun 9, 2025
1d7e373
feat: 루루 API 작성
brothergiven Jun 9, 2025
e0c64ab
feat: Captioning API S3 URL 기반으로 수정
brothergiven Jun 9, 2025
585b156
refact: 필드 명 수정
brothergiven Jun 9, 2025
bb5d8b3
docs: Update README.md
brothergiven Jun 9, 2025
abb114c
refact: 파일 명 수정
brothergiven Jun 9, 2025
912b5cc
refact: 불필요 코드 삭제
brothergiven Jun 9, 2025
0739a76
fix: ResponseModel 수정
brothergiven Jun 10, 2025
5fd474d
fix: 프롬프트 수정
brothergiven Jun 11, 2025
a3c2df8
feat: 사용된 키워드 pool 저장
brothergiven Jun 11, 2025
46897da
refact: 게임 context 저장 방법 수정
brothergiven Jun 11, 2025
f8abe4a
refact: 프롬프트 수정
brothergiven Jun 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# PR 제목

## 📝 개요

<!-- 작성 배경 -->

---

## ⚙️ 구현 내용

<!-- 구현한 내용 -->

---

## 📎 기타

<!-- 참고 사항, 이슈, 고려했던 사항 등 -->

---

## 🧪 테스트 결과

<!-- 테스트 내용 (선택) -->

---
63 changes: 63 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy

on:
push:
branches: ["develop"]


jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
# 1. checkout develop branch
- name: Checkout develop
uses: actions/checkout@v3
with:
ref: develop

# 2. Docker 로그인
- name: Login to Docker Hub
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}

# 3. 이미지 build 및 push
- name: Build and Push Docker image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/gotcha-ai:latest .
docker push ${{ secrets.DOCKER_USERNAME }}/gotcha-ai:latest


deploy:
needs: build-and-push
runs-on: ubuntu-latest

steps:
# 1. checkout branch
- name: Check PR
uses: actions/checkout@v3

# 2. EC2 pull
- name: EC2 Docker Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
port: ${{ secrets.SERVER_SSH_PORT }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_PRIVATE_KEY }}
script: |
cd ~/ai-server

docker stop ai-server || true
docker rm ai-server || true

docker system prune -a -f || true

docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker pull ${{ secrets.DOCKER_USERNAME }}/gotcha-ai:latest

docker run -d \
--name ai-server \
--env-file .env \
-p 8000:8000 \
${{ secrets.DOCKER_USERNAME }}/gotcha-ai:latest
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,7 @@ cython_debug/

# PyPI configuration file
.pypirc

*quickdraw*

.idea
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.10-slim AS builder

WORKDIR /app

COPY requirements.txt .

RUN apt-get update && apt-get install -y libgl1 libglib2.0-0
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt



FROM python:3.10-slim
WORKDIR /app
RUN apt-get update && apt-get install -y libgl1 libglib2.0-0
COPY --from=builder /usr/local /usr/local

COPY src/ src/
COPY run.py config.py .

CMD ["python", "run.py"]
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## 📌 컨벤션


### 커밋 메시지

| message | description |
| --- | --- |
| feat | 새로운 기능 추가, 기존 기능을 요구 사항에 맞추어 수정 |
| fix | 기능에 대한 버그 수정 |
| docs | 문서(주석) 수정 |
| style | 코드 스타일, 포맷팅에 대한 수정 |
| refact | 기능 변화가 아닌 코드 리팩터링 |
| test | 테스트 코드 추가/수정 |
| chore | 패키지 매니저 수정, 그 외 기타 수정 ex) .gitignore |

## 프로젝트 구조

```
├── src/
│ ├── __init__.py
│ ├── main.py # entry point (FastAPI 객체 생성)
│ ├── api/ # 라우팅 구성
│ │ ├── __init__.py
│ │ ├── image_routes.py # 이미지 처리 관련 API 엔드포인트
│ │ ├── myomyo_routes.py # MYOMYO 메시지 관련 API 엔드포인트
│ │ └── lulu_routes.py # LULU 메시지 관련 API 엔드포인트
│ ├── chat/
│ │ ├── __init__.py
│ │ ├── myomyo.py # 묘묘 프롬프트 및 게임 흐름 관리
│ │ └── lulu.py # 루루 프롬프트 및 게임 흐름 관리
│ ├── image/
│ │ ├── __init__.py
│ │ ├── trained_model/
│ │ │ ├── model.pth # quickdraw 기반 분류 모델
│ │ ├── classifier.py # quickdraw 기반 분류 기능
│ │ ├── model.py # CNN 모델 정의
│ │ ├── img_caption.py # BLIP 기반 captioning 기능
│ │ ├── preprocessor.py # 이미지 전처리
│ │ └── text_masking.py # easyocr 기반 텍스트 마스킹 기능
```
Empty file removed app/config.py
Empty file.
4 changes: 0 additions & 4 deletions app/main.py

This file was deleted.

Empty file removed app/routers/predict_router.py
Empty file.
1 change: 0 additions & 1 deletion app/services/__init__.py

This file was deleted.

Empty file removed app/utils/__init__.py
Empty file.
Loading