전체 글
-
Choosing your AI model (AI 모델 선택하기)AI&ML 2023. 6. 24. 13:01
최근에 AI에 대한 관심이 실제 기업에서 어떤 식으로 적용할수 있을까에 대한 기술검증이 활발합니다. 우리말에 구슬도 꿰어야 보배다 라는 말이 있죠. 아무리 뛰어난 기술이라도, 어떤식으로 활용할수 있을지 눈에 보이지 않는다면, 신기류에 불과할 뿐일 것입니다. 처음 AI 모델을 선택할때 어떻게 시작해야할까요? 기업환경에 가장 적합한 모델을 선택하는것은 하나의 조건이 있는것이 아니라, 여러가지 조건들을 잘 따져 봐야 할것 입니다. 아래는 AI 모델을 선택할때 고려해야할 조건들을 나열해 보았습니다. - 모델이 바로 사용할 수 있는 품질을 보장하는가? - 추론 속도/지연 시간 - 비용 - 미세 조정(Fine-tune) / 확장성 - 데이터 보안 및 라이센스 허용성 대부분의 경우, 바로 선택할수 있는 모델은 GPT..
-
간단한 Azure OpenAI 사용하기!AI&ML 2023. 5. 29. 21:29
간단하기 OpenAI를 사용해서 질문을 던져보는 코드를 만들어볼게요. 아래코드는 Azure OpenAI를 사용했습니다. import json import openai import os from dotenv import load_dotenv load_dotenv() 단순히 필요한 패키지를 가져오고 환경 변수를 로드하는 코드입니다. json, openai, os, dotenv 패키지를 가져와서 사용합니다. dotenv 패키지는 .env 파일을 로드하여 환경 변수를 설정하는 데 사용됩니다. 루트디렉토리에 .env 파일을 만들고 필요한 환경변수를 셋팅합니다. config.json 파일을 하나더 만들어서 필요한 환경변수를 셋팅합니다. # Load config values with open(r'config.json..
-
기업환경에서 openAI 보다 Azure OpenAI를 써야하는 이유?AI&ML 2023. 5. 17. 21:16
챗GPT와 같은 LLM 모델이 요즘 핫하다. 대 생성AI 시대라고도 하는데 거의? 지능을 가진 머신이라고 해야하나? 암튼, 정말 기계랑 사람처럼 대화할수 있는 세상이 되었다. 이 엄청난 AI 모델을 기업환경, 즉 비지니스 프로세스에 적용하고 싶어 하는 사람들이 많을것이다. 왜냐?? 돈이 될수도 있기 때문이다. 하지만, 기업의 데이터는 컨피덴셜한 경우가 많다. 보안이 중요하다는 얘기다. 그럼, 이 데이터를 AI가 다 훔쳐가는게 아닐까? 당연히 걱정되는 포인트다. 그럼 이 챗GPT와 같은 API를 사용하기 위해서 openAI사이트에서 유료결재하고, 바로 사용하면 될까? 기업환경이라면, Azure OpenAI를 사용하기를 권장드린다. 아래표는 OpenAI와 Azure OpenAI의 차이점에 대해서 간략하게 설..
-
구글Bard가 챗GPT보다 더 나은데? 구글의 반격AI&ML 2023. 5. 11. 09:10
오늘 아침에 뉴스를 보니 그동안 한글이 지원되지 않았던 구글의 AI모델인 Bard에서 드디어 한글을 지원한다고 합니다. 소식을 듣자마자 바로 사용해봤어요. 챗gtp처럼 글자가 한자씩 말하는것처럼 찍히진 않지만, 한번에 나오는 속도가 빠르게 느껴집니다. 구글 Bard가 좀더 발전된 모습을 보여주는 것이, 새로운 데이터에 대해서도 응답을 해주는 모습이 인상적이었습니다. 오늘 서울의 날씨를 물어보니 아래처럼 응답을 해주더라구요. 챗GTP는 아래처럼 외부 데이터와 단절된것을 알수 있습니다. 그리고 또하나 개발자의 입장에서 보면 괜찮은 기능이, 코드를 물어보고 바로 실행할수 있는 환경을 제공한다는 것인데요. 구글 같은경우 파이썬을 바로 실행해볼수 있는 Colab 환경을 지원하는데요. 놀랍게도 아래처럼 파이썬 함수..
-
파이썬 Streamlit 를 사용해서 간편하게 Web UI를 작성해보자!Python 2023. 5. 9. 22:12
Streamlit은 웹 애플리케이션을 구축하기 위한 Python 라이브러리입니다. 웹 개발 경험 없이도 빠르고 쉽게 웹 애플리케이션을 만들고 공유할 수 있습니다. Streamlit의 주요 이점은 단순성과 사용 편의성입니다. Streamlit을 사용하면 몇 줄의 Python 코드만으로 데이터 기반 웹 애플리케이션을 구축하고 배포할 수 있습니다. 웹 개발의 많은 복잡성을 추상화하여 데이터와 분석에 집중할 수 있습니다. Streamlit은 웹 콘텐츠를 생성하는 파이썬 코드를 작성할 수 있게 동작합니다. 데이터 분석 및 기계 학습을 위해 표준 Python 라이브러리를 사용한 다음 Streamlit을 사용하여 대화형 웹 앱에 결과를 표시할 수 있습니다. 슬라이더, 드롭다운 및 텍스트 상자와 같은 위젯을 포함하여 ..
-
Azure Cognitive Search (애저 인지 검색)AI&ML 2023. 5. 4. 21:43
Azure Cognitive Search(애저 인지 검색)은 마이크로소프트 애저가 제공하는 클라우드 기반 검색 서비스입니다. 응용프로그램 및 웹 사이트에 강력한 검색 기능을 추가하여 사용자가 관련 정보를 빠르게 찾을 수 있도록 합니다. Azure Cognitive Search는 다음과 같은 검색 환경을 사용자 지정할 수 있는 몇 가지 기능을 제공합니다: - 인덱스 검색: 텍스트, 숫자 및 지리공간 데이터를 포함하여 검색할 데이터를 정의하는 검색 색인을 만들 수 있습니다. - 검색 쿼리: 검색 쿼리를 사용하여 검색 용어, 필터 및 정렬 옵션을 포함한 검색 기준을 정의할 수 있습니다. - 스킬 세트: 기술 집합을 사용하여 주요 구문, 엔티티 및 감정 분석과 같은 추가 정보를 데이터에서 추출할 수 있습니다. ..
-
나의 TXT 데이터를 OpenAI를 이용하여 FastAPI로 서비스해보자!AI&ML 2023. 5. 3. 00:10
안녕하세요. LLM 모델인 chat gpt 를 활용해서 나만의 텍스트 데이터를 OpenAI를 연동해서 질문해 보는 서비스를 만들어 보겠습니다. 간단하게 파이썬을 이용해서 아래와 같은 순서로 작업합니다. 필요한 라이브러리를 설치해줍니다. openai 같은 LLM 모델들을 이용해서 애플리케이션을 개발하는데 유용한 Langchain 라이브러리를 이용합니다. from fastapi import FastAPI ,File, UploadFile , Request from pydantic import BaseModel from langchain.document_loaders import DirectoryLoader, TextLoader from langchain.text_splitter import CharacterT..
-
파이썬 에러 ERROR 해결 및 사용팁Python 2023. 4. 27. 21:48
1.VS코드에서 여러버전의 파이썬을 사용하고 있을때 버전 바꾸는 법 2.파이썬 설치시 Path는 아래에 체크박스를 선택해준다. 3.pip 으로 패키지 설치시 에러시 wheel setuptools pip 업그레이드 pip install wheel setuptools pip --upgrade 4.pip install dotenv 시 error 발생 pip install python-dotenv dotenv 이 아니고 python-dotenv 인데 10분째 삽질하다 찾아냄.ㅠ