{"id":13449419,"url":"https://github.com/cloudacademy/sentiment-analysis-aws-lambda","last_synced_at":"2025-05-06T11:32:05.145Z","repository":{"id":77791695,"uuid":"56849182","full_name":"cloudacademy/sentiment-analysis-aws-lambda","owner":"cloudacademy","description":"How to deploy a Machine Learning model for sentiment analysis in the Cloud with AWS Lambda.","archived":false,"fork":false,"pushed_at":"2020-10-22T10:15:09.000Z","size":39095,"stargazers_count":106,"open_issues_count":0,"forks_count":31,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-10-28T16:44:52.974Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudacademy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-22T11:00:32.000Z","updated_at":"2024-09-11T06:04:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"f81ada1d-227f-4acb-b3b7-e93bc628b1b2","html_url":"https://github.com/cloudacademy/sentiment-analysis-aws-lambda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacademy%2Fsentiment-analysis-aws-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacademy%2Fsentiment-analysis-aws-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacademy%2Fsentiment-analysis-aws-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudacademy%2Fsentiment-analysis-aws-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudacademy","download_url":"https://codeload.github.com/cloudacademy/sentiment-analysis-aws-lambda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224501634,"owners_count":17321868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T06:00:37.604Z","updated_at":"2024-11-13T18:22:26.428Z","avatar_url":"https://github.com/cloudacademy.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Sentiment analysis in the Cloud with AWS Lambda.\n\nThe Cloud Academy team shows how to build a sentiment analysis machine learning model by using a pubic dataset and how to deploy it to production with AWS Lambda and API Gateway.\n\n![Frontend Screenshot](frontend/screenshot.png?raw=true)\n\n## How to install requirements\n\nOS libraries can be installed as follows (Linux):\n\n    $ sudo yum install -y atlas-devel atlas-sse3-devel blas-devel gcc gcc-c++ lapack-devel python27-devel\n\nPython requirements can be installed with pip.\n\n    $ pip install -r requirements.txt\n    \n## Training phase\n\nYou can train and persist the model into file by executing:\n\n    $ python main.py\n\n## Test the model locally\n\nYou can run the model via CLI as follows:\n\n    $ python predict.py \"This function is awesome\"\n    \u003e positive\n    \n## How to deploy the Lambda function\n\nSimply execute the following deployment script:\n\n    $ ./deploy.sh\n\nIt will automatically create a new deployment package containing every Python dependency and the OS libraries required by scikit-learn and numpy, together with the \"lambda\" folder.\n\n[Here](https://github.com/ryansb/sklearn-build-lambda) you can find the whole stack ready to be uploaded  ([reference](https://serverlesscode.com/post/deploy-scikitlearn-on-lamba/)).\n\nOnce the deployment package is ready, you can create a new AWS Lambda function and bind it to a new Amazon API Gateway endpoint.\n\n### References\n\n* [Cloud Academy \u0026 AWS: how we use Amazon Web Services for machine learning and data collection](https://cloudacademy.com/webinars/cloud-academy-and-aws-how-we-use-aws-machine-learning-and-data-collection-10/) (webinar)\n\n* [Using Scikit-Learn In AWS Lambda](https://serverlesscode.com/post/deploy-scikitlearn-on-lamba/) (article by [Ryan Brown](https://github.com/ryansb))\n\n* [Sentiment Analysis dataset](http://cs.stanford.edu/people/alecmgo/trainingandtestdata.zip) (by cs.stanford.edu)\n\n* [Amazon Serverless Architecture](http://cloudacademy.com/blog/amazon-serverless-api-gateway-lambda-cloudfront-s3/) (Cloud Academy blog)\n\n* [Google Cloud Functions VS AWS Lambda](http://cloudacademy.com/blog/google-cloud-functions-serverless/) (Cloud Academy blog)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudacademy%2Fsentiment-analysis-aws-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudacademy%2Fsentiment-analysis-aws-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudacademy%2Fsentiment-analysis-aws-lambda/lists"}