감정분석 - #5
Open
b-gyung03 wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📂 sentiment.ipynb
[셀 1, 2] 라이브러리 설치
[셀 3] 라이브러리 임포트
[셀 4] GCP 인증
[셀 5] Colab Secrets 로드 (Colab의 '비밀(Secrets)' 탭(🔑 아이콘)에 저장된 5개의 민감한 정보(DB 유저/비밀번호/이름, 인스턴스 연결 이름, Gemini API 키)를 안전하게 불러와 변수에 할당)
[셀 6] LLM 및 DB 연결 설정
[셀 7] LLM 프롬프트 정의
[셀 8] LLM 응답 스키마 정의
[셀 9, 10] Cloud SQL Auth Proxy 실행
[셀 11] DB 엔진(Engine) 생성 및 연결 테스트
[셀 12] SQL - DB 전체 테이블 목록 확인
[셀 13] DB 테이블 확인
[셀 14] DB에서 기사 데이터 로드
[셀 15] 네트워크 프록시 충돌 해결
[셀 16] LLM 모델 객체 생성 (JSON 모드)
[셀 17, (18)] 네트워크 오류 처리를 위한 모듈 임포트, (네트워크 오류 자동 재시도 함수)
[셀 19] 핵심 API 분석 및 'v3' 자동 재시도 함수 정의
[셀 20, 21, 22] 기사 3개, 10개, 100개 분석 결과 확인 (DB 저장 안함)
[셀 23] 셀 19, 20, 21 결과 JSON 파일로 다운로드
[셀 24] ENUM 허용 값 목록 조회
[셀 25] DB 엔진(Engine) 재시작
[셀 26] DB 저장 확인
[셀 27] '재시작'용 확인 코드
[셀 28] 'v3' 재시도 함수 정의 (최종본)
[셀 29] '재시작'용 확인 코드
[셀 30] 배치 처리 코드 (셀 29 출력 값을 보고 START_INDEX 수정하며 가져오기)
📂 analysis_results_100
sentiment.ipynb 에서 셀 22와 셀 23의 결과 json 파일
📂prompt_template.py
sentiment.ipynb 에서 셀 7 내용