RAG, langchain, claude,sbert
- Open all .py file and find all # TODO , follow TODO description to change the values.
- Suppose you're running on EC2, make sure EC2 role has following permissions:
Permission: AdminAccess
Trust Relationship:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Action": "sts:AssumeRole"
},
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:sts::<your acc ID>:assumed-role/<your EC2 instance Role>/<your EC2 instance ID>"
},
"Action": "sts:AssumeRole"
}
]
}
-
Make sure your Opensearch Collection has the right Data access policies for your EC2 role access:
-
Prepare env with python ^3.10.12 and pip ^23.3.1
-
Run as following:
$ pip install -r requirements.txt $ streamlit run webapp.py
Then you'll see a website, looking like this: This website can be accessible to anyone if your EC2 has public IP address.