DEV Community

Alex
Alex

Posted on • Edited on

How to Generate web apps in minutes with AI

IntelliNode is open source module to connect to any AI model and switch between them without changing your code. You can choose to generate the images from stable diffusion or DALL·E, or text from Openai and cohere without impacting your business app logic.

Following is an app example that that uses IntelliNode to generate web pages from a user prompt:
Register page generation
generate registration pages

Another use case is the ability to convert csv files to elegant diagrams without coding:
Dashboard html
generate diagrams

The module provides a Gen function that generates tuned business case content in one line:
Generate blog post
const blogPost = await Gen.get_blog_post(prompt, openaiApiKey);

Or generate html pages
await Gen.save_html_page(text, folder, file_name, openaiKey);

For advanced capabilities, you can use the controllers behind the Gen function:

Image generation function

async function generateImage(imageText, apiKey, modelBackend) {
  const imgModel = new RemoteImageModel(apiKey, modelBackend);
  const imageInput = new ImageModelInput({
    prompt: imageText,
    numberOfImages: 3,
    width: 512,
    height: 512
  });
  return await imgModel.generateImages(imageInput);
}
Enter fullscreen mode Exit fullscreen mode

Generate image with stable diffusion:
const images = await generateImage(imageDescription, MyKeys.stability, SupportedImageModels.STABILITY);

Or switch to DALL·E 2:
const images = await generateImage(imageDescription, MyKeys.openai, SupportedImageModels.openai);

To download the node module:
npm i intellinode

You can interact with the module using the show case application:
https://show.intellinode.ai/

Or connect the capabilities to your apps using the github repo:
https://github.com/Barqawiz/IntelliNode

Which functions or capabilities you would like to add to the node module?

Top comments (0)