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.
- A Configuration File Creation: Create a file named
configs/config.yaml
based on theconfigs/config-template.yaml
file, and make sure to specify thes3_bucket_name
.
-
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.