calling builtin AI algorithms to train and predict via REST API - algorithm

I saw few references to uploading saved models to Google cloud and using them via REST API. Is there any way we can utilize prebuilt(built-in) Google AI algorithm such as 'wide and deep' in web application. We have a case where we are working on self service application where users will upload datasets which needs to be provided to this algorithm for training. Once it has been trained, we would like to intimate user about availability of the trained model and use it via API calls for predicting. We know the saved custom model path and tried all ok. But we need to use builtin algorithm in similar fasion.
Any pointers are highly appreciated.
Kiran

Related

Spring Boot + Google Vision AI

Good night! Guys, I need some advice from Java developers about my monkey code. I'm learning Spring Boot, and I need to make an application that can take images medium REST API or UI on Vaadin after you recognize objects on it with Google AI, the result must be saved in PgSQL + some more requirements described in README.md.
In general, I've made an outline of REST and can get ready-made recognition. But I have many questions:
I have to cover the code with integration + unit tests. I don't have integration questions but how to write units for SpringBoot applications, did each method need to be covered?
How do I automatically generate Sql INSERT for oid PgSQL tables (DataGrip, DBeaver can't do that)? I want to add this to the Flyway migration.
I use many to many links, how do I implement Hibernate deletion from three tables (all I know so far is how to do it in pure SQL)?
In handlePicrureUpload() I not only upload the image but also write the image into PgSQL tags. It's a very serious error how to run these actions only when the handlePicrureUpload() method is finished.
How to make multithreaded uploading and processing of images? How to track the status of each recognition, a separate controller that takes the statuses from Google Cloud?
How to output c /api/ai/ getAiResults() table in Vaadin. How to display the picture in the Vaadin table and how to schedule the tag list in the field (it was highly desirable to edit them).
I know that Google has all these answers, but I'm a little time constrained right now. You can hit me with a stick.
Cloud Vision documentation - https://cloud.google.com/vision/docs
Thank you to everyone who will respond!
I have to cover the code with integration + unit tests. I don't have
integration questions but how to write units for SpringBoot
applications, did each method need to be covered?
unit tests are generally for each method.
I use many to many links, how do I implement Hibernate deletion from
three tables (all I know so far is how to do it in pure SQL)?
JPA supports deleting records. If you have cascade delete setup between the tables you don't need to delete them one by one.
In handlePicrureUpload() I not only upload the image but also write
the image into PgSQL tags. It's a very serious error how to run these
actions only when the handlePicrureUpload() method is finished.
You are using the wrong OR operator in your handlePicrureUpload. It should be ||
-How to make multithreaded uploading and processing of images? How to track the status of each recognition, a separate controller that takes
the statuses from Google Cloud?
Spring provides #Async to execute methods asynchronously in separate thred. It sounds like you want to do some sort of queueing of requests. To start simple, you can save the request in a table 'request' and return a request id to track it. You can setup a #Scheduled job that reads new operations every X interval and process. You can setup a REST endpoint to return the status of request.

Do Laravel and Vue always use RESTful APIs to communicate?

After coding for a couple of years, I have implemented many different software services into applications I was coding, using API documentation that software owner has provided. And I thought that was all about APIs I need to know, that it's just a way to make to software services communicate with each other.
But now I got a task to create an application, I wont go into detail, but let's say it just needs to implement CRUD operations and that it should use Vue on front and Laravel on back. And in the explanation of a task it is mentioned that I should use REST API for triggering those operations. And that's the part that confuses me!
Since I have never created an application from scratch, I was only working on already stable applications, fixing bugs and implementing new functionalities (and I guess this is the what it looks like for the most of the people who work in big companies today), and that's why I thought that those two frameworks (Vue and Laravel) have already implemented REST APIs since they can communicate between themselves.
Why am I specifically asked to use REST API to trigger those operations? Is there any way other than using an API to make front communicate with back (even I am using frameworks already)? If not, do they want me to create my REST API for communication and not use the one that is already provided by frameworks? I am confused, why did they mention to use REST API as if it wasn't default option, something that shouldn't even even be questionable, just an expected behavior.
why did they mention to use REST API as if it wasn't default option
For many years, offering an API in the backend for JS frontend consumption was not the default option. Traditional "round trip" applications use a form that submits to the server with a full page refresh, and I'd hazard a guess that most web applications live today still work like that.
With the advent of Vue, React, Angular etc, there is an expectation that fetching data and sending data is done via APIs in an AJAX operation. This gives applications a more seamless feel, and they're faster, since only a relatively small amount of data needs to be sent or received.
In small Laravel/Vue applications, the frontend and backend are often in the same repo, and are deployed together as a single unit. However, as the size and complexity of an application increases, there is value in splitting up these pieces into microservices, which can be deployed separately, without tricky system dependencies complicating the deployment pipeline and sign-off process. Using an API lends itself well to that approach.
Indeed, as the backend increases, the API is not one service, but several, split by process area (e.g. user, sign-up, checkout, dashboard, etc).
Do Laravel and Vue always use ... APIs to communicate?
So, to answer your main question, you don't have to use APIs/AJAX with Vue and Laravel. You can still use standard HTTP forms and redraw the whole screen if you want.
Do Laravel and Vue always use RESTful APIs to communicate? [my emphasis]
Another way of interpreting the question is that perhaps you have received instructions from someone who was differentiating a REST API from a different kind of API. On the web, GraphQL is becoming more popular. Server-to-server, SOAP (XML) used to be very common, and is still in use in many enterprises.
FOA, The gap is not going to fill "ASAP" because it requires domain knowledge that you are missing. And yes RESTful API is the best way unless you want multi-dimensional communication across multiple platforms.

System API in mulesoft

I have a requirement to persist some data in a table (single table). The data is coming from UI. Do i need to write just the system API and persist the data OR i need to write process and system API both? I don't see a use of process API in this case. Please suggest. Is it always necessary to access system API through process API or system API can be invoked without process API as well.
I would recommend a fine-grained approach to this. We should be following it through the experience layer even though we do not have must customization to the data.
In short, an experience layer API and directly calling System layer API (if there is no orchestration/data conversion/formatting needed)
Why we need a system API & experience API? A couple of points.
System API should be more attached to the underlying system. And if
in case, in the future, it changes then it should not impact any of
the clients.
Secondly, giving an upper layer gives us the feasibility to add
different SLAs, policies, logging and lots more, to different
clients. Even if you have a single client right now it's better to
architect for the future. Reusing is the key advantage of these APIs.
Please check Pattern 2 in this document
That is a question for the enterprise architect in your organisation. In this case, the process API would probably be a simple proxy for the system API, but that might not always be the case in future. Also, it is sometimes useful to follow a standard architectural pattern even if it creates some spurious complexity in the implementation. As always, there are design trade-offs and the answer will depend on factors that cannot be known by people outside of your organisation.

Algorithms behind the Alchemy API for concept and keywords extraction

I've started using the alchemy API but I would like to know if
there is any scientific publication that explains the models used for extracting the keywords and the concepts from the text?
Also according to this answer Is there way to influence AlchemyAPI sentiment analysis
the models used for the alchemy Api were trained on billions of web pages. My question is on which type of data the algorithms were trained on
(only news content for example?).
Thank you in advance for the answers.
Their website says that AlchemyAPI uses a deep learning model. Other than that tidbit, they keep their secret sauce under wraps.
Now that they've been acquired by IBM, their APIs are part of IBM's Bluemix suite of machine learning services. There is a way to train the model using your own data. The custom model option is not cheap though: $3,500.00 USD/Custom Model Instance per Month, in addition to API request charges.
If you want an open-source alternative try DatumBox. It's open-source, and you can dig in as deep as you'd like.

What is the simplest way for me to use Google's APIs?

Currently, I'm trying to get a list of advertisers (See http://code.google.com/apis/gan/v1beta1/advertisers/list.html) with my relationship status from Google's API.
I'm using Ruby and the 'google-api-client' gem and I'm writing this as an automated task. I've suddenly been thrust in to their world of browser windows, shell scripts, and every nut and bolt of OAuth2. I think I'm using the solution for a much different problem - accessing the data of people coming to your website. I just want MY data. Surely there's a much simpler way for me to get it?
Many other affiliate networks give me a REST service (or butchering thereof) and secret params/headers for auth.
I've registered myself as user of my 'device'. My app can now access my data!
I followed the instructions here:
https://code.google.com/apis/accounts/docs/OAuth2ForDevices.html
Is this the correct/best way to do it? I am unsure.

Resources