No-Code AI: Integrate the NLP Cloud API Into A Bubble.io App

Thanks to the rise of no-code platforms like Bubble.io and the creation of brand new cutting-edge AI models based on Transformers, like GPT-3, GPT-J, GPT-NeoX, Bart, and more, it is now possible to create advanced AI applications without writing a single line of code. In this article, we will see how to connect the NLP Cloud API to a Bubble.io application in order to perform advanced AI operations like summarization, paraphrasing, NER, question answering, blog post generation, product description creation, and much more.

Bubble.io
NLP Cloud

No-Code AI: What Is It Exactly?

No-code platforms are more and more popular these days. Understandably! Programming is getting more and more complex ever year, hiring good programmers is hard and expensive, and at the same time less and less projects can live without a good web application these days...

It's no surprise that no-code services look so attractive. These platforms provide advanced WYSIWYG interfaces to build your own application without writing a single line of code. Thanks to these modern UI based tools, you can now reach an impressive level of sophistication and ship your new MVP in no time.

These last couple of years, AI technologies have made a lot of progress, especially when it comes to natural language processing. You can now easily perform advanced text understanding and text generation tasks like chatbots, summarization, paraphrasing, entity extraction, question answering, automatic blog post generation, automatic product description creation, and much more. The rise of large language models like GPT-3, GPT-J, and GPT-NeoX really helped!

So it's now easier than ever to build a fully-fledged AI product that is built on AI and no-code technologies!

Bubble.io And NLP Cloud

There are several good no-code platforms out there. They do not all have the same level of sophistication or the same expertise. Some are very good at building beautiful interfaces. Others are good at building advanced backend logic...

Bubble.io is a popular no-code platform that allows for very advanced customization. It takes some practice to master it, but then you can achieve impressive results without any programming skills.

NLP Cloud (us) is an advanced API for natural language processing that serves the best cutting-edge AI models for text understanding and text generation (GPT-3, GPT-J, GPT-NeoX, Bart, and more). You can easily try the most advanced AI features on NLP Cloud's playground: visit the Playground here.

NLP Cloud is an API, so it usually takes a developer to integrate it into your product. But when combined with Bubble.io, it's not the case anymore.

Automatic Blog Post Generation With NLP Cloud And Bubble.io

Let's create a simple Bubble.io project that leverages NLP Cloud in order to generate a whole blog post article out of a mere title. This feature is based on the GPT-J AI model, an open-source alternative to GPT-3. The most important part is about setting the Bubble.io's API connector.

First, create a new project on Bubble.io:

Create a project on Bubble.io

Then follow the application assistant:

Bubble.io assistant
Bubble.io assistant
Bubble.io assistant

Based on your project settings, at some point, the assistant should propose you to add an API connection. If it doesn't, no worry, you can still do it later by going to the "Plugins" section. Search for the API Connector and install it:

Bubble.io install API connector

Now that your project is successfully created, go to the "Plugins" section, and in the API Connector click "Add another API":

Bubble.io create API connection

It's now time to set up the actual connection to the NLP Cloud API. First set the authentication as "self-handled":

Bubble.io authentication self-handled

Set the following POST URL: https://api.nlpcloud.io/v1/gpu/fast-gpt-j/article-generation

Set 2 headers. The first one has key = Authorization, value = Token your_token, and tick the Private box. The second one has key = Content-Type, and value = application/json.

In the JSON body box, paste the following example: {"title": "How to become an entrepreneur"}. The goal here is to generate a whole article that talks about how to become an entrepreneur.

Then simply click "Initialize call" to check that the call to NLP Cloud for article generation worked. It will take some time (from 10 to 30 seconds) as generating a whole blog article is extremely computation intensive:

Bubble.io NLP Cloud API connection

You should now get something like the following, that confirms that the connection works:

Bubble.io check connection

Congratulations! You can now use the NLP Cloud API anywhere in your Bubble.io project! For example, if you want to display a blog post article in a text box, here is what you could do:

Bubble.io use API connection

This example was about using NLP Cloud's blog post generation API, but you can of course use all the API endpoints available on NLP Cloud. In Bubble.io's API Connector, simply change the POST URL and the JSON body. See more about that in NLP Cloud's documentation here.

Security Considerations

Don't forget that your NLP Cloud API token should be kept secret. Do not share it with anyone, and if several persons are working in parallel on the same AI project, you can simply invite them to your team in your NLP Cloud dashboard. In that case, each member will receive its own API token, and you can easily revoke an access if needed (if a person leaves the project for example).

Keep in mind that your API token should not be exposed on the frontend side of your Bubble.io application. If an API token is used somewhere in the user's browser, it means that anyone can retrieve it and use it without control

Performance Considerations

Some AI models respond within milliseconds while others can take 20 to 30 seconds to respond. If the response time is critical to your users, we encourage you to use NLP Cloud's AI models on GPUs, which usually makes the response time around 10x faster.

Also, once your Bubble.io application is deployed and used in production (i.e. by real users), you will need to make sure that your NLP Cloud's plan allows for enough requests, and especially enough parallel requests. If not, some of your requests might be rejected.

Conclusion

In 2022, it is possible to create cutting edge AI applications without writing a single line of code thanks to Bubble.io and NLP Cloud.

This combination opens the door to many exciting new possibilities. Sky is the limit here!

Bubble.io proposes a free plan, and on NLP Cloud all the AI models can be tested for free too. If not done yet, register on NLP Cloud here.

François
Full-stack engineer at NLP Cloud