This project is a web application built with Blazor. It uses the Azure OpenAI API to analyze and generate images based on provided prompts and URLs.
- Azure account
- Either Azure OpenAI endpoint and apiKey or OpenAI API key.
- VS Code
- Docker
- Dev Containers extension for VS Code
-
Image Analysis Quickstart: Image Analysis 4.0
-
Generate images with Azure OpenAI Service Quickstart: Generate images with Azure OpenAI Service
- Clone the repository.
- Open the project in VS Code.
- VS Code will prompt you to open the project in a dev container. Click 'Reopen in Container'.
- Restore the packages:
dotnet restore
- Set your environment variables
- OpenAI API key or Azure OpenAI API key:
export AZURE_OPENAI_API_KEY=<your_api_key>
- Azure OpenAI endpoint (if you're using Azure OpenAI):
export AZURE_OPENAI_ENDPOINT=<your_endpoint>
- Azure Computer Vision API key:
export VISION_KEY=<your_api_key>
- Azure Computer Vision endpoint:
export VISION_ENDPOINT=<your_endpoint>
- OpenAI API key or Azure OpenAI API key:
- Code in Home.razor
- Run the project locally using
dotnet watch
- Run the project:
dotnet run