Code Monkey home page Code Monkey logo

azsdkdemo's Introduction

Azure SDK Demo - Azure Image Analyzer

The repo demonstrates Azure SDK usage via a complete application. This application takes in an image, uploads it to Blog Storage and enqueues a message into a Queue. A process receives that message and uses Form Recognizer to extract the text from the image, then uses Text Analytics to get the sentiment of the text, and then stores the results in a Cosmos DB.

Pre-reqs

The following are required to run this application.

  1. A Terminal - We tested this with Git Bash and WSL - it will not currently work with PowerShell or Windows Command Prompt. The Terraform deployment currently only works on Linux compatible systems. You will need to run all the commands below in your selected terminal.
  2. Install Azure CLI
  3. Install Terraform
  4. Install Git
  5. Install VS Code
  6. Install Docker
  7. An Azure Subscription

Azure Resources

The following Azure resources will be deployed with the Terraform script.

  1. Resource Group
  2. Storage Account
  3. Cognitive Services Form Recognizer
  4. Cognitive Services Text Analytics
  5. Cosmos DB
  6. App Service: Plan
  7. App Service: Web Apps
  8. App Service: API Apps
  9. Application Insights

Code Setup

  1. Open Git Bash or WSL - The same terminal you used to install the pre-reqs above.

    NOTE: Known issue: The following terraform deployment doesn't work in WSL2. We are investigating that issue for now use Git Bash.

  2. Clone Repo git clone https://github.com/jongio/azsdkdemo
  3. Azure CLI Login az login
  4. Create Azure Resources with Terraform
    1. CD to iac/terraform
    2. Terraform init: terraform init
    3. Terraform plan: terraform plan -var="basename=azsdkdemo1" --out tf.plan

      Change the basename variable from azsdkdemo1 to something that will be globally unique. It will be used as part of Azure resource names, so keep it short, lowercase, and no special characters.

    4. Terraform apply: terraform apply tf.plan
  5. Update .env file
    1. Rename .env.tmp to .env
    2. Copy and paste the terraform output values to the .env file.

      NOTE: .env files do not allow spaces around the =, so please remove any spaces after you copy and paste.

Run Application

  1. CD to src folder for the language you would like to run, i.e. for .NET, cd to src/net for Python, cd to src/python
  2. Run docker-compose up --build
  3. Navigate to http://localhost:1080
  4. Add an Image
    1. Enter url into text box and click "Submit"
    2. Or click "Add Random Meme"
    3. The image will be added to the grid. Wait for the service to pick it up. You will eventually see the text and the image border color will change indicating the image text sentiment.

azsdkdemo's People

Contributors

christothes avatar imgbotapp avatar jongio avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.