EAI6010_Assignment5

.docx

School

Northeastern University *

*We aren’t endorsed by this school

Course

6010

Subject

Computer Science

Date

Apr 3, 2024

Type

docx

Pages

2

Uploaded by ConstableNarwhal4186

Report
EAI6010: APPLICATIONS OF ARTIFICIAL INTELLIGENCE Module 5: Assignment: Microservice Model Deployment QUESTION 1: Descriptions of the service’s general input and output. SOLUTION: The input used is the code file of the classifier model in which I have passed the JSON object consisting of a header, a short description, and a content type, and the output is the result of the prediction of the model as well as a complete JSON representation of the given input. QUESTION 2: Specific examples of the service’s input and output. SOLUTION: Here, I have used the text classifier model as input in the cloud service and the steps are as follows: 1. I have created a new project in the Google Cloud and saved the project ID. 2. Navigate to the cloud storage and select the project. Now, create a bucket with a unique name. Upload the text classifier file in the created buck. 1
3. Install the Google Cloud command line and place the folder in a convenient location google- cloud-sdk. 4. Download the required files – main.py, requirements.txt and dockerfile. 5. I have used the gcloud to build the deploy service. gcloud run deploy classify-article --project eai6010assignment48916 --source . --region us-central1 --allow-unauthenticated --memory=1024Mi 6. From the above figure we can see that the service is deployed, and the service URL is available. 7. Now I have passed the curl into the gcloud service with the received service URL. curl -d '{"headline": "A Swirling Vortex Is No Match for This Deep-Sea Sponge", "shortDescription": From the above figure, we can see that the URL got rejected and I have tried several types, but I am getting this error. QUESTION 3: The URL of the service. REFERENCES: [1] How To Deploy ML Models With Google Cloud Run - https://www.python-engineer.com/posts/cloud-run-deployment/#1-write-app-flask-tensorflow [2] Module 5: Lesson 2: Model Deployment - https://northeastern.instructure.com/courses/174853/pages/module-5-lesson-2-model- deployment?module_item_id=9750770 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help