Skip to content

Feat/#4#7

Merged
Gumraze-git merged 20 commits intodevfrom
feat/#4
Jul 12, 2025
Merged

Feat/#4#7
Gumraze-git merged 20 commits intodevfrom
feat/#4

Conversation

@Gumraze-git
Copy link
Copy Markdown
Member

📣 Related Issue

5, 6, 7개 감정으로 comment를 분류하는 KoBERT 모델 생성

🙏 Question & PR point

대용량 모델 파일을 받기 위해서 아래 절차 실행 필요함.

  • 최초 한 번만 받으면 됨
git lfs install
  • LFS 포인터에 대응하는 실제 가중치 다운로드
git lfs pull

- main.py, db.py, config.py, routers/home.py에서 불필요한 주석 삭제
- 7가지 및 5가지 감정 상태를 나타내는 상수 LABELS_7, LABELS_5 추가
- 모델 디렉토리 설정을 위한 "model_dir" 필드 추가 및 os.getenv를 활용한 환경변수 기능 적용
- API 제목을 "MovieMood - KoBERT Emotion API"로 수정
- 감정 예측을 위한 POST 및 GET 엔드포인트 생성
- 텍스트 기반 감정 확률 계산 및 MongoDB 저장 로직 구현
- 예측 기록 조회 기능 추가
- KoBERT 모델 기반 텍스트 감정 예측 함수 predict_emotions 구현
- 토크나이저 및 모델 로드 로직 포함
- 감정 분석 결과 및 텍스트 데이터를 나타내는 TextItem, Prediction 모델 추가
- predict 라우터를 FastAPI 애플리케이션에 등록
- uvicorn import 위치 조정
- LABELS_7 및 LABELS_5의 "joy"를 "happiness"로 변경
- LABELS_6 상수 추가
- MODEL_DIR 기본값을 "models/0712_kobert_5_emotion_model"로 변경
- LABELS_6과 LABELS_5의 항목 순서 재정렬
- 오타 "LABLES_5"를 "LABELS_5"로 수정
Copy link
Copy Markdown
Member

@Sangyoon98 Sangyoon98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

머지가 머지

Copy link
Copy Markdown

@yangjiseonn yangjiseonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인햇습니다 !

@Gumraze-git Gumraze-git merged commit 5bc9a81 into dev Jul 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants