Skip to content

Commit 20cf145

Browse files
author
wowzoo
committed
bedrock demo
1 parent 15cd2f6 commit 20cf145

File tree

1 file changed

+33
-9
lines changed
  • genai/genai-app-demo/01-prompt-engineering-demo

1 file changed

+33
-9
lines changed

genai/genai-app-demo/01-prompt-engineering-demo/README.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,34 @@
11

22
# Bedrock Demo
3-
This repository is a Gen AI demo using claude 3. It contains 5 pre-built examples which help customers getting started with the Amazon Bedrock.
3+
본 데모는 무신사에 딜리버리한 데모를 기반으로 하고 있습니다. 총 5가지의 데모를 Claude 3 모델 기반으로 프롬프트 엔지니어링 기법으로 만들었습니다.
4+
5+
> [!NOTE]
6+
> 실제 데모에서는 무신사의 데이터를 이용하였으나 본 Repository에 올리기 위해서 무신사의 데이터를 삭제하였습니다.
7+
8+
1. [Prompt Demo](./frontUI/app/pages/1_Prompt_Demo.py)
9+
- 질문/답변 형식의 일반적인 GenAI 데모입니다.
10+
2. [Review Summary Demo](./frontUI/app/pages/2_Review_Summary_Demo.py)
11+
- 무신사에서 판매중인 상품의 리뷰들을 모아 분석해서 색상, 핏, 소재, 세탁, 가격 등의 항목으로 보여줍니다.
12+
3. [Review Comment Demo](./frontUI/app/pages/3_Review_Comment_Demo.py)
13+
- 무신사의 고객들이 작성한 리뷰를 분석해서 상품에 대한 구매자의 Sentiment 를 추측하고 이에 적합한 답변을 생성해 줍니다.
14+
4. [Product Identify Demo](./frontUI/app/pages/4_Product_Identify_Demo.py)
15+
- 신발 이미지를 올리면 이미지를 분석해서 상품에 대한 정보와 이와 비슷한 아디다스 신발을 추천해 줍니다.
16+
- 현재는 Claude 3의 정보로만 신발을 추천해 주는데 고객사의 상품 데이터로 DB를 구축하면 고객사의 상품에서만 추천을 할 수 있다고 가이드합니다.
17+
5. [Video ShotForm](./frontUI/app/pages/5_Video_ShotForm.py)
18+
- 무신사는 MUSINSA TV 라는 유투브 채널을 운영중인데 다양한 동영상들이 있습니다. 대부분 길이가 10분 이상인 동영상들인데 숏폼이 유행하는 현재 트렌드에 맞게 이러한 동영상의 핵심만 요약해서 1분 내외의 짧은 동영상으로 바꾸어 줍니다.
19+
20+
21+
## Architecture
22+
Backend를 구성하는 아키텍처입니다. Frontend는 Streamlit을 사용하였습니다.
23+
Frontend에서 API 호출을 통해 Backend에 구성된 Lambda를 호출하는 방식입니다.
24+
25+
Backend는 *ALB와 Lambda를 통해 Bedrock를 호출하는 부분**코드 변경에 따른 실시간 Lambda Function 업데이트를 위해 CodeCommit과 CodeBuild 등을 사용한 CI/CD*로 구성되어 있습니다.
426

527
![Pic 1.](architecture.png)
628

729
## Prerequisites
8-
- Make sure you have [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured with an aws account you want to use.
9-
- To build container image, [Docker Engine](https://docs.docker.com/engine/install/) must be installed.
30+
- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)가 설치되어 있고 사용하려는 계정으로 설정되어 있는지 확인합니다.
31+
- 컨테이너 이미지를 빌드하려면 [Docker Engine](https://docs.docker.com/engine/install/)이 설치되어 있어야 합니다. *Lambda 함수가 컨테이너 이미지를 사용하고 있습니다.*
1032

1133
### install cdk
1234
```shell
@@ -22,9 +44,9 @@ export AWS_PROFILE=[The configuration profile for aws-cli]
2244
## How to deploy
2345

2446
### Step 1. Create virtualenv
25-
After cloning this git repository. You need to create virtualenv.
47+
python을 사용하여 코드가 작성되었고 관련 라이브러리를 설치해야 하므로 python 가상 환경을 구성합니다.
2648
```shell
27-
cd bedrock-demo
49+
cd aws-ai-ml-workshop-kr/genai/genai-app-demo/01-prompt-engineering-demo/
2850
python3 -m venv .venv
2951
source .venv/bin/activate
3052
```
@@ -35,13 +57,14 @@ pip install -r requirements.txt
3557
```
3658

3759
### Step 3. Deploy CDK
38-
Before running the cdk deploy command, make sure the Docker Engine is running in the background.
60+
cdk deploy를 하기 전에 우선 Docker Engine이 실행 중인지 확인합니다. cdk deploy를 실행하면 기존에 빌드된 컨테이너 이미지가 없으면 자동으로 컨테이너 빌드를 수행합니다.
61+
3962
```shell
4063
cdk deploy BedrockDemo
4164
```
4265

4366
### Step 4. Set Environment Variables
44-
After successfully deploying the cdk, there are two variables in the output. One is the DNS name of the ALB and the other is the name of the S3 bucket. Copy these and make them environment variables.
67+
cdk를 성공적으로 배포하고 나면 Outputs에 *ALB의 DNS 이름**S3 버킷 이름*이 출력됩니다. 이를 복사하여 환경 변수로 만듭니다.
4568

4669
![Pic 2.](cdk_output.png)
4770

@@ -52,17 +75,18 @@ export BUCKET_NAME=[The name of the S3 bucket]
5275
```
5376

5477
### Step 5. Run streamlit
78+
frontUI 디렉토리로 이동하여 streamlit 을 실행시킵니다. streamlit 이 실행되면 자동으로 브라우저에 데모 페이지가 로딩됩니다.
5579
```shell
5680
cd frontUI
5781
streamlit run app/Home.py
5882
```
5983

6084
![Pic 3.](run_streamlit.png)
6185

62-
The browser will open a demo page if streamlit is running successfully.
86+
로딩된 데모 페이지에서 5개의 데모를 확인할 수 있습니다.
6387

6488
## Clean up resources
65-
If you've created anything by yourself, you'll need to delete it.
89+
기본적으로 cdk destroy를 하면 모든 생성된 리소스가 삭제됩니다. 다만 S3 버킷은 수동으로 삭제해야 합니다.
6690

6791
### Destroy Stack
6892
```shell

0 commit comments

Comments
 (0)