This application leverages the IP-Adapter model for AI avatar photo generation, developed with AWS services and Gradio for an interactive interface. It utilizes the AWS Cloud Development Kit for quick infrastructure provisioning, making the setup process straightforward for demonstration purposes.
- Python Installation: Ensure Python is installed in your environment.
- AWS Configuration: Set up your AWS credentials and configuration prior to deployment. This includes having access to an AWS account and the AWS CLI configured on your machine.
- S3 Bucket Preparation: If you do not already have an S3 bucket, create one. Update the
s3_bucket_name
in theconfigs/config.yaml
file with your bucket's name. Make sure the bucket is in the same region as specified in your config file.
-
Install the AWS CDK:
- Run
npm install -g aws-cdk
to install the AWS Cloud Development Kit globally on your machine.
- Run
-
Install Python Dependencies:
- Execute
pip install -r requirements.txt
to install necessary Python packages for the app.
- Execute
-
Model Preparation:
- Download the model file to the HuggingFace repository and upload it to your S3 bucket using
python scripts/upload_model.py
.
- Download the model file to the HuggingFace repository and upload it to your S3 bucket using
-
Deploy with CDK:
- Utilize the CDK to deploy SageMaker models, endpoints, Lambda functions, API Gateway, and more with
cdk deploy
.
- Utilize the CDK to deploy SageMaker models, endpoints, Lambda functions, API Gateway, and more with
- Start the Gradio web application by running
python run.py
. Open the output URL in your browser to interact with the application.
- To avoid incurring unnecessary charges, stop the application by pressing
CTRL + C
and delete the deployed infrastructure withcdk destroy
.
- This guide assumes basic familiarity with AWS services and command line operations.
- For detailed documentation on each component, please refer to the respective AWS and Gradio documentation.
- Contributions are welcome! Feel free to open issues or pull requests to improve the application or documentation.