파란하늘의 지식창고
article thumbnail
stable diffusion webui 사용해 보기
Study/Python 2023. 5. 31. 13:01

stable diffusion 소개whisper를 사용해 본 김에 ai 관련 오픈소스를 찾아보니 stable diffusion이 있었다. stable diffusion은 2022년에 공개된 오픈소스로 text to image 인공지능 모델이라고 한다. 이미지에 대한 여러 단어들과 각종 설정들을 통해 이미지를 생성하거나 생성된 이미지를 기반으로 다시 재생성을 하기 위한 다양한 기능을 제공하여 생성된 이미지를 다듬어나갈 수 있다. https://github.com/Stability-AI/stablediffusion stable diffusion은 whisper와 동일하게 python으로 제공된다. 다만 whisper처럼 단순하게 음성을 텍스트로 변환하는 게 아닌 이미지 생성과 관련한 다양한 설정을 편하게 하..

article thumbnail
Open AI Whisper 사용해 보기
Study/Python 2023. 5. 31. 03:13

Whisper 소개 Whisper는 Open AI에서 공개한 인공지능 모델로 음성을 분석해 텍스트로 변환할 수 있다. https://openai.com/ https://github.com/openai/whisper 로컬에서 python으로 실행해 볼 수도 있고 whisper를 좀 더 편하게 쓸 수 있는 오픈 소스들이 github에 계속 만들어지고 있는 듯하다. Whisper 설치 사전 준비 다음의 사전 준비를 하면 된다. Python 설치 GPU를 사용할 수 있도록 CUDA Toolkit 설치 CUDA에 cuDNN(CUDA Deep Nural Network Library)을 추가 CUDA와 cuDNN 설치를 하지 않아도 whisper를 사용할 수 있다. CUDA Toolkit 설치 CUDA Toolkit..

Spring Boot 3.1 Release Notes
Study/Java 2023. 5. 26. 22:17

전체 Release Notes 목록은 이곳에서 확인할 수 있습니다. https://luvstudy.tistory.com/tag/Release%20Notes https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.1-Release-Notes 19 revision 기준으로 작성됨 Upgrading from Spring Boot 3.0 Dependency Management for Apache HttpClient 4 Spring Framework 6에서는 Apache HttpClient 5를 선호하기 위해 RestTemplate 을 사용하는 Apache HttpClient 4에 대한 지원이 제거되었습니다. Spring Boot 3.0에는 HttpC..

JDK 20 New Features
Study/Java 2023. 5. 7. 15:39

JDK의 버전별 변경 사항은 이곳을 참고하세요. Spec Java SE 20 Platform JSR 395에 정의된 바와 같이 JSR 395 구현이 목표 실제 Spec은 Final Release Specification 문서를 참고해야 함 Final Release Specification Feature Summary 전체 JEP Feature 목록은 OpenJDK의 JDK20 문서로 확인할 수 있다. JEP Component Feature JEP 429 core-libs Scoped Values (Incubator) JEP 432 specification/language Record Patterns (Second Preview) JEP 433 specification/language Pattern Mat..

article thumbnail
spring-asciidoctor-backends 사용해 보기
Study/Java 2023. 5. 6. 11:54

spring-asciidoctor-backends 소개 spring으로 개발하면 spring documentation을 자주 보게 된다. https://docs.spring.io/spring-framework/docs/current/reference/html/ 이 문서는 asciidoctor를 사용하여 만들어졌다. java maven에서는 asciidoctor-maven-plugin을 사용하여 문서를 생성한다. https://asciidoctor.org/ spring-asciidoctor-backends는 asciidoctor-maven-plugin dependency에 추가하는 라이브러리로 spring documentation 생성 시 필요한 몇 가지 기능과 문서 스타일을 제공한다. 이전에 spring..

RestTemplate response generic type 사용하기
Study/Java 2023. 5. 5. 02:17

ParameterizedTypeReference를 사용한 List response 사용 예전에 restTemplate으로 list 타입 response를 받는 것에 대해 글을 작성한 적이 있다. 2018.11.16 - [Study/Java] - RestTemplate list 반환하기 응답이 List 일 때 ParameterizedTypeReference로 아래와 같이 사용한다. ResponseEntity response = restTemplate.exchange("url",HttpMethod.GET, null, new ParameterizedTypeReference() {}); List list = response.getBody(); Generic response type 사용하기 이 경우에 대해서도 ..

ObjectMapper readValue generic type 사용하기
Study/Java 2023. 4. 23. 08:39

List 객체를 반환받기 위해 TypeReference 사용하기 ObjectMapper는 List 같은 Collection 형태의 객체 반환을 위해 TypeReference를 제공하고 있다. (정확히는 List를 위해서가 아니라 generic parameterType을 가진 class를 위해서 제공하고 있다.) 이를 사용하면 다음과 같이 List를 받을 수 있다. List objectMapper.readValue(new ClassPathResource("someFile.json").getFile(), new TypeReference

article thumbnail
springdoc-openapi swagger @ExampleObject annotation 사용해 보기
Study/Java 2023. 4. 13. 04:52

swagger annotation을 사용하여 문서화 작업을 하면 너무 많은 양의 swagger annotation이 오히려 코드의 가독성을 많이 떨어트리게 되어 이에 대해 좀 더 정리하여 사용해보려고 한다. swagger annotation에 대한 자세한 설명은 아래 github wiki에 있다. https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations 설정하기 spring boot 프로젝트에서 springdoc-openapi의 사용은 다음과 같이 의존성을 추가하면 된다. webmvc의 경우 아래 dependency를 추가하고 webflux인 경우 springdoc-openapi-starter-webflux-ui를 추가하면 된다..