목록2024/12/06 (1)
반업주부의 일상 배움사
[Ollama] 이미지 이용하기
로컬에 Ollama 서버를 실행했다고 가정할게요.$ ollama serve from ollama import generatefrom io import BytesIOfrom PIL import Imageimport osdef process_image(image_file): with Image.open(image_file) as img: with BytesIO() as buffer: img.save(buffer, format='PNG') image_bytes = buffer.getvalue() for response in generate(model='llava:latest', prompt='Wh..
IT 인터넷/일반
2024. 12. 6. 19:13