Skip to content

Commit

Permalink
update: 카테고리명은 번역하지 않게 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
voka committed Oct 29, 2023
1 parent 808ac09 commit 85a7832
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,7 @@ public void requestCategories(Photo photo){

CategoryInferenceResponse categoryInferenceResponse = photoInferenceWithAI.getClassificationsByPhoto(photo.getSignedUrl()).orElseThrow(() -> new RuntimeException("classification 과정에서 오류 발생"));

List<String> requiredTranslateResult = categoryInferenceResponse.getCategories();
List<String> result = new ArrayList<>();
for(String translateText :requiredTranslateResult){
result.add(translators.papagoTranslate(translateText));
}
List<String> result = categoryInferenceResponse.getCategories();
for(String categoryName : result){
Category category = categoryRepository.findByName(categoryName).orElseGet(() -> createCategory(categoryName));
PhotoCategory photoCategory = PhotoCategory.builder().photo(photo).category(category).build();
Expand Down

0 comments on commit 85a7832

Please sign in to comment.