felipekiko / poc-ai-vision

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image Reading with OpenAI GPT-4V API in AWS

About the Project

This project utilizes the OpenAI API for reading and interpreting images, providing insights into visual content. It is hosted on AWS, leveraging serverless services for scalability and efficiency. The development is done using AWS SAM to facilitate deployment and management of infrastructure as code.

Architecture

Architecture Diagram

Prerequisites

To run this project, you will need:

  • An AWS account
  • AWS CLI configured
  • SAM CLI installed
  • Python 3.x installed
  • Access to the OpenAI API

Environment Setup

  1. Clone the repository to your local machine:
git clone git@github.com:felipekiko/poc-ai-vision.git
cd poc-ai-vision
  1. Create and configure your AWS and OpenAI credentials in the .local/environment.json file with the following structure:
{
    "OpenAIVisionFunction": {
        "OPENAI_API_KEY": "YOUR OPENAI API KEY"
    }
}
  1. Install the project dependencies:
pip install -r function/requirements.txt

Running the Project

To run the project locally, use the SAM CLI:

  • .local/event.json: Event data for the function
  • .local/environment.json: Variables for the environment
sam local invoke -e .local/event.json -n .local/environment.json

Deployment

To deploy the project to AWS, use the SAM CLI:

sam deploy --stack-name YOUR_STACK_NAME --capabilities CAPABILITY_IAM --s3-bucket YOUR_S3_BUCKET

References

Contributing

Contributions are very welcome! If you have a suggestion for improvement or found a bug, feel free to open an issue or create a pull request.

  1. Fork the project
  2. Create your Feature Branch (git checkout -b feature/NewFeature)
  3. Commit your changes (git commit -m 'Add some NewFeature')
  4. Push to the Branch (git push origin feature/NewFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Felipe KiKo - @felipekiko - felipe.kiko@gmail.com

Project Link: https://github.com/felipekiko/poc-ai-vision

About


Languages

Language:Python 100.0%