This service is responsible for processing images using AI models. It is a RESTful service that accepts an image URL and returns the information extracted from it:
- Item label
- Item brand
- Item model
- Item condition
- Item description
- Item price
The service uses the Azure OpenAI API GPT-4o to generate the information based on the image. The information is then returned to the caller.
To run the AI Image Processing Service locally, you need first to build the common module and then start the service. Follow the instructions below in the order they are presented:
-
Ensure that the Eurka Server is running. If not, start the Eureka Server
-
Set the following environment variables:
export AZURE_OPENAI_ENDPOINT=<your-azure-openai-endpoint>
-
Start the AI Image Processing Service
./mvnw spring-boot:run
-
Set the following environment variables:
CONTAINER_REGISTRY_NAME=<your-acr-name> TAG=1.1.0
-
Login to Azure Container Registry
az acr login --name $CONTAINER_REGISTRY_NAME
-
Build the image
docker build -t $CONTAINER_REGISTRY_NAME.azurecr.io/ai-image-processing-service:$TAG .
-
Push the image
docker push $CONTAINER_REGISTRY_NAME.azurecr.io/ai-image-processing-service:$TAG