Code Monkey home page Code Monkey logo

aws-comprehend-elasticbeanstalk-for-flask's Introduction

Visualize AI/ML Model Results using Flask and AWS Elastic Beanstalk

The contents of this repository provide a example Flask application that passes user-provided data to Amazon Comprehend and visualizes the results using Plotly. The steps below also demonstrate how to deploy this application to Amazon Elastic Beanstalk.

NOTE: This repository is designed to supplement this APG library pattern: Visualize AI/ML Model Results Using Flask and AWS Elastic Beanstalk.

Steps to implement the application:

  1. Sign in to an AWS account with administrator privileges.
  2. Clone this repository into your working machine.
  3. cd into the repository and install the requirements using pip install -r requirements.txt
  4. Test the Flask application locally, using python application.py This should return information about serving the application, with an output similar to the below -
* Serving Flask app "application" (lazy loading) 
* Environment: production
 WARNING: This is a development server. Do not use it in a production deployment.
 Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

You can now access the app using the URL in your output.

Deploy the application to AWS Elastic Beanstalk

  1. Initialize your AWS Elastic Beanstalk application using eb init -p python-3.6 <app-name> --region <region_name>
  2. Create and deploy the Elastic Beanstalk environment using eb create <env-name>
  3. Make sure to add Amazon Comprehend access to the EC2 instance created using AWS Elastic Beanstalk. You can use either the AWS console or use the command below. aws iam attach-role-policy --policy-arn arn:aws:iam::aws:policy/ComprehendFullAccess --role-name aws-elasticbeanstalk-ec2-role

This will begin the provisioning all of the necessary architectural components within AWS. This process can take about 5 minutes to complete. Once your application is successfully deployed, the deployment URL should be returned in the command line, or you can run eb open to open your application in the browser.

Credits and References:

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-comprehend-elasticbeanstalk-for-flask's People

Contributors

amazon-auto avatar cscaudill avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aws-comprehend-elasticbeanstalk-for-flask's Issues

Deploy says "warning"

when this application is deployed on the UI, the health status changes to "Warn!"

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.