In this example, we will see how we can work with Machine Learning applications written in Python with a NodeJS Script, to build a Polyglot Machine Learning application for scraping similar news articles.


Install MetaCall CLI:

$ curl -sL | sh

Install application dependencies:

  • For Python: metacall pip3 install -r requirements.txt
  • For NodeJS: metacall npm i readline-sync

Run the Example

$ metacall app.js

Once the application is kick-started, you will be prompted to enter a News Article which you would like to find similar articles for. Let's use this sample article for testing our application:

Here is the application output:

$ metacall app.js
Information: Global configuration loaded from /gnu/store/5cxmq6y8z24ijnvhh6lndgpriwnhf3jl-metacall-0.3.17/configurations/global.json
Enter the News URL:
│                                                       (index)                                                       │    Values     │
│ │ '83.68405286' │
│                               │ '60.35694007' │
│                               │ '94.97681053' │
│                                                                │ '60.67538891' │
│                         │     '0.'      │
Script (app.js) loaded correctly

Deployment using MetaCall FaaS

After deploying the application into the FaaS, it can be accessed with (change <your_alias> by the alias you used to sign up):

curl -X POST<your_alias>/ml-news-article-scraper-example/v1/call/similarNews -X POST --data '{ "url": "" }'