feat: batch instagram ocr partial results#19
Open
KyungminPark-steck wants to merge 2 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.
✨ 무엇을 바꿨나요?
Instagram 이미지 OCR fallback을 5장 단위 batch 처리로 변경하고, 처리 중에도 일정 수 이상의 장소 결과가 확보되면 partial result를 조회할 수 있도록 개선했습니다.
🔗 관련 이슈
Closes #18
💡 왜 바꿨나요?
기존에는 Instagram post 이미지 OCR fallback에서 최대 10장의 이미지를 모두 OCR한 뒤 HF 추출과 Kakao 검색을 한 번에 수행했습니다. 이 때문에 여러 장소를 포함한 게시물에서는 사용자가 최종 결과를 오래 기다려야 했고, 추출 후보 수도 12곳으로 제한되어 결과가 부족할 수 있었습니다.
📝 주요 변경 사항
OCR -> HF 장소 추출 -> Kakao 장소 검색수행job_results에 partial result 저장PROCESSING상태여도 저장된 result가 있으면/jobs/{jobId}/result에서 200 응답👀 리뷰어가 보면 좋은 부분
PROCESSING상태에서 result가 있을 때/jobs/{jobId}/result를 200으로 반환하는 API 계약 변경이 적절한지🧪 테스트
방식 (해당하는 것만 체크)
메모 (시나리오, 커맨드, 스크린샷 링크 등 — 선택)
.\.venv\Scripts\python.exe -m pytest -q194 passed, 9 skippedhttps://www.instagram.com/p/DWdnskCgYpj/succeeded=Trueimage_count=10ocr_text_count=10final resolved=32https://www.instagram.com/p/DUkieoqj46S/succeeded=Trueimage_count=11ocr_text_count=11final resolved=24