Hugging Face - Visual Blocks
\n\n\nVisual blocks is an amazing tool from our friends at [Google](https://github.com/google/visualblocks)\nthat allows you to easily create and experiment with machine learning pipelines using a visual interface.\nThis repository contains the source code for custom components that allow you to use Hugging Face client and server models in your Visual Blocks pipelines.\nWe've created a few nodes supporting different tasks and models following our [Tasks](https://huggingface.co/tasks) definitions.\n\n> [!NOTE]\n> Visual Blocks seems to be mostly working in Chrome. If you are having trouble with the interface, try using Chrome, and please submit an [issue](https://github.com/google/visualblocks/issues) to the Visual Blocks team.\n\nImportant links:\n\n- https://visualblocks.withgoogle.com\n- https://github.com/huggingface/visual-blocks-custom-components\n- https://www.npmjs.com/package/huggingface-visualblocks-nodes\n- https://cdn.jsdelivr.net/npm/huggingface-visualblocks-nodes@latest\n\n
Table of Contents
\n\n- [How to use the custom components](#how-to-use-the-custom-components)\n- [Nodes and Examples](#nodes-and-examples)\n - [Client Nodes](#client-nodes)\n - [Translation](#translation)\n - [Token Classification](#token-classification)\n - [Text Classification](#text-classification)\n - [Object Detection](#object-detection)\n - [Image Segmentation](#image-segmentation)\n - [Image Classification](#image-classification)\n - [Depth Estimation](#depth-estimation)\n - [Background Removal](#background-removal)\n - [Server Nodes](#server-nodes)\n - [Text Generation and Chat Completion](#text-generation-and-chat-completion)\n - [Fill Mask](#fill-mask)\n - [Image Classification](#image-classification-1)\n - [Summarization](#summarization)\n - [Text Classification](#text-classification-1)\n - [Text Generation](#text-generation)\n - [Text to Image](#text-to-image)\n - [Token Classification](#token-classification-1)\n - [Extra Examples](#extra-examples)\n- [Local Development](#local-development)\n\nHugging Face + Visual Blocks Custom Components
\n\n
\n \n
\n
Visual blocks is an amazing tool from our friends at Google\nthat allows you to easily create and experiment with machine learning pipelines using a visual interface.\nThis repository contains the source code for custom components that allow you to use Hugging Face client and server models in your Visual Blocks pipelines.\nWe've created a few nodes supporting different tasks and models following our Tasks definitions.
\n\n\nVisual Blocks seems to be mostly working in Chrome. If you are having trouble with the interface, try using Chrome, and please submit an issue to the Visual Blocks team.
\n
Important links:
\n- \n
- https://visualblocks.withgoogle.com \n
- https://github.com/huggingface/visual-blocks-custom-components \n
- https://www.npmjs.com/package/huggingface-visualblocks-nodes \n
- https://cdn.jsdelivr.net/npm/huggingface-visualblocks-nodes@latest \n
Table of Contents
\n\n\nHow to use the custom components
\nTo start playing with our custom components you need to Add a custom node to your Visual Blocks project. First you need to start a new project https://visualblocks.withgoogle.com/#/edit/new, then click on the \"+\" button in the bottom left corner to add a new node.
\nThen input the pre-bundled code from our npm package. You can do this by pasting the following link into the input field and clicking \"Submit\":
\nhttps://cdn.jsdelivr.net/npm/huggingface-visualblocks-nodes@latest\n\nThen you will be able to see three Hugging Face Collections: Client, Server and Common.
\nNodes and Examples
\nClient Nodes
\nClient nodes are nodes running tranformers pipelines on the client side using Transformers.js. All Client nodes have WASM and WebGPU (experimental) backend support, and you can find web-compatible models by visiting https://huggingface.co/models?library=transformers.js.
\n\n\nWebGPU support in transformers.js is still experimental and may not work on all devices. Not all models are supported by WebGPU backend yet.
\n
Translation
\nMore info:
\n- \n
- https://huggingface.co/tasks/translation \n
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TranslationPipeline \n
Token Classification
\nToken Classification Node Example
\nMore info:
\n- \n
- https://huggingface.co/tasks/token-classification \n
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TokenClassificationPipeline \n
Text Classification
\nText Classification Node Example
\nMore info:
\n- \n
- https://huggingface.co/tasks/text-classification \n
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TextClassificationPipeline \n
Object Detection
\nMore info:
\n- \n
- https://huggingface.co/tasks/object-detection \n
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ObjectDetectionPipeline \n
Image Segmentation
\nImage Segmentation Node Example
\nMore info:
\n- \n
- https://huggingface.co/tasks/image-segmentation \n
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ImageSegmentationPipeline \n
Image Classification
\nImage Classification Node Example
\nMore info:
\n- \n
- https://huggingface.co/tasks/image-classification \n
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ImageClassificationPipeline \n
Depth Estimation
\nMore info:
\n- \n
- https://huggingface.co/tasks/depth-estimation \n
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.DepthEstimationPipeline \n
Background Removal
\nBackground Removal Node Example
\nServer Nodes
\nServer nodes are nodes running Transformers pipeline tasks using the Hugging Face Serverless API. For a few selected LLM models, it's running using our hosted Text Generation Inference, our fast, optimized inference for LLMs.
\n\n\nYou can use the Hugging Face Serverless API for free with limited usage, after which you'll be rate limited. If you need more usage, you can create an account at https://huggingface.co/join and get an API token at https://huggingface.co/settings/tokens or log in using the Hugging Face Login node.
\n
For server nodes you have the option to Login using your Hugging Face account to get more usage and access to private models. Using Hugging Face Hub Login
\nIf successful, you can obtain your Apikey directly from the Hugging Face Hub Login node.
\nText Generation and Chat Completion
\nChat Template Text Generation Node Example
\nMore info:
\n\nFill Mask
\nMore info:
\n\nImage Classification
\nImage Classification Node Example
\nMore info:
\n\nSummarization
\nMore info:
\n\nText Classification
\nText Classification Node Example
\nMore info:
\n\nText Generation
\nMore info:
\n\nText to Image
\nMore info:
\n\nToken Classification
\nToken Classification Node Example
\nMore info:
\n\nExtra Examples
\nBackground Removal Text to Image
\nChat Completion Text to Image Depth
\nImage Segmentation Webcam Client
\nLocal Development
\n- \n
Clone the repository
\n
\ngit clone https://github.com/huggingface/visual-blocks-custom-components.git\ncd visual-blocks-custom-components\n\nInstall the dependencies
\n
\nnpm i\n\nRun the development server
\n
\nnpm run dev\n\nVisit Google's staging server
\n \nClick the + in the bottom left corner to add the custom nodes.
\n \nPaste in the link to the script (e.g., http://localhost:8080/index.js) and click \"Submit\".
\n \n
AI & ML interests
None defined yet.
Hugging Face + Visual Blocks Custom Components
Visual blocks is an amazing tool from our friends at Google that allows you to easily create and experiment with machine learning pipelines using a visual interface. This repository contains the source code for custom components that allow you to use Hugging Face client and server models in your Visual Blocks pipelines. We've created a few nodes supporting different tasks and models following our Tasks definitions.
Visual Blocks seems to be mostly working in Chrome. If you are having trouble with the interface, try using Chrome, and please submit an issue to the Visual Blocks team.
Important links:
- https://visualblocks.withgoogle.com
- https://github.com/huggingface/visual-blocks-custom-components
- https://www.npmjs.com/package/huggingface-visualblocks-nodes
- https://cdn.jsdelivr.net/npm/huggingface-visualblocks-nodes@latest
Table of Contents
How to use the custom components
To start playing with our custom components you need to Add a custom node to your Visual Blocks project. First you need to start a new project https://visualblocks.withgoogle.com/#/edit/new, then click on the "+" button in the bottom left corner to add a new node.
Then input the pre-bundled code from our npm package. You can do this by pasting the following link into the input field and clicking "Submit":
https://cdn.jsdelivr.net/npm/huggingface-visualblocks-nodes@latest
Then you will be able to see three Hugging Face Collections: Client, Server and Common.
Nodes and Examples
Client Nodes
Client nodes are nodes running tranformers pipelines on the client side using Transformers.js. All Client nodes have WASM and WebGPU (experimental) backend support, and you can find web-compatible models by visiting https://huggingface.co/models?library=transformers.js.
WebGPU support in transformers.js is still experimental and may not work on all devices. Not all models are supported by WebGPU backend yet.
Translation
More info:
- https://huggingface.co/tasks/translation
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TranslationPipeline
Token Classification
Token Classification Node Example
More info:
- https://huggingface.co/tasks/token-classification
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TokenClassificationPipeline
Text Classification
Text Classification Node Example
More info:
- https://huggingface.co/tasks/text-classification
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TextClassificationPipeline
Object Detection
More info:
- https://huggingface.co/tasks/object-detection
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ObjectDetectionPipeline
Image Segmentation
Image Segmentation Node Example
More info:
- https://huggingface.co/tasks/image-segmentation
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ImageSegmentationPipeline
Image Classification
Image Classification Node Example
More info:
- https://huggingface.co/tasks/image-classification
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ImageClassificationPipeline
Depth Estimation
More info:
- https://huggingface.co/tasks/depth-estimation
- https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.DepthEstimationPipeline
Background Removal
Background Removal Node Example
Server Nodes
Server nodes are nodes running Transformers pipeline tasks using the Hugging Face Serverless API. For a few selected LLM models, it's running using our hosted Text Generation Inference, our fast, optimized inference for LLMs.
You can use the Hugging Face Serverless API for free with limited usage, after which you'll be rate limited. If you need more usage, you can create an account at https://huggingface.co/join and get an API token at https://huggingface.co/settings/tokens or log in using the Hugging Face Login node.
For server nodes you have the option to Login using your Hugging Face account to get more usage and access to private models. Using Hugging Face Hub Login
If successful, you can obtain your Apikey directly from the Hugging Face Hub Login node.
Text Generation and Chat Completion
Chat Template Text Generation Node Example
More info:
Fill Mask
More info:
Image Classification
Image Classification Node Example
More info:
Summarization
More info:
Text Classification
Text Classification Node Example
More info:
Text Generation
More info:
Text to Image
More info:
Token Classification
Token Classification Node Example
More info:
Extra Examples
Background Removal Text to Image
Chat Completion Text to Image Depth
Image Segmentation Webcam Client
Local Development
Clone the repository
git clone https://github.com/huggingface/visual-blocks-custom-components.git cd visual-blocks-custom-componentsInstall the dependencies
npm iRun the development server
npm run devVisit Google's staging server
Click the + in the bottom left corner to add the custom nodes.
Paste in the link to the script (e.g., http://localhost:8080/index.js) and click "Submit".