AI Interpolator Huggingface

Last updated on
15 March 2024

This page has not yet been reviewed by AI Interpolator maintainer(s) and added to the menu.

The Huggingface is the most flexible and advanced of the plugins, since it has access to over 30000 different models that can be used via the free inference API or the dedicated endpoint via Huggingface the possibilities are endless.

Since they have the free inference API you can also test it without incurring any costs, but please note that the availability is not always good, so you might end up pulling your hairs. For production use you should always pay for the dedicated endpoints.

Also check the prices before trying the free API so you don't paint yourself into a corner by setting up things with the free API that ends up costing a lot of money. Sometimes using OpenAI from the start is cheaper.

What is extremely cool with this plugin compared to any other is that you can use it on finetune privately hosted models or even models built from scratch. One example is that you need to generate images for a client where they want to place the CEO of that company in different situations without taking photos. With DallE or DreamStudio this is just not possible. But using a finetuned Stable Diffusion model would do the trick.

Module link: https://www.drupal.org/project/huggingface

Installation

  • Use Composer to get the module: "composer require 'drupal/huggingface:^1.0@alpha'"
  • Install the AI Interpolator Huggingface like any other module. This will install the base Huggingface module as well.
  • Login to your Huggingface account and get an API token.
  • Visit /admin/config/huggingface/settings and paste the API token.

How to use

Since this module covers so many use cases and so many different ways of using it, you would have to refer to the rules listed below. There are however two settings you have to fill in on any rule worth mentioning.

In this use case we will do the simplest automatic summary of content.

Type of Inference

Choose the type of inference to use, between the free API or the dedicated endpoint.

Huggingface Model

If you use the free API here, you have to give the namespace to a  model, that allows to use the free dedicated api.

Huggingface Endpoint URL

If you use the dedicated endpoint API here, you have to give the url to an endpoint that hosts a model.

Example ideas of workflows that could be done with the Huggingface plugin.

  • Anything including finetuned models.

You can also find videos of OpenAI Workflows under workflows-of-ai.com

Workflows of AI

Available Rules

Rule Name Description Field Types
Huggingface Audio Classification (to category) This runs a audio classification task on any model in Huggingface that have inference API and fills strings. Reference (taxonomy term)
Text (list)
Huggingface Audio Classification (to string) This runs a audio classification task on any model in Huggingface that have inference API and fills strings. Text (plain)
Huggingface Automatic Speech Recognition This transcribes audio into text. Text (plain, long)
Text (formatted, long)
Huggingface Image Classifier (to category) This runs a image classification task on any model in Huggingface that have inference API and fills taxonomies or list strings. Reference (taxonomy term)
Text (list)
Huggingface Image Classifier (to string) This runs a image classification task on any model in Huggingface that have inference API and fills strings. Text (plain)
Huggingface Question Answering This answers a question, based on a context. Text (plain)
Text (plain, long)
Text (formatted)
Text (formatted, long)
Huggingface Summarization This runs a summarization task on any model in Huggingface that have inference API. Text (plain, long)
Text (formatted, long)
Text (formatted, long, with summary)
Huggingface Text Analysis (to category) This runs a text classification task on any model in Huggingface that have inference API and populates lists or taxonomies. Reference (taxonomy term)
Text (list)
Huggingface Text Analysis (to string) This runs a text classification task on any model in Huggingface that have inference API and populates lists or taxonomies. Text (plain)
Huggingface Text Generation his runs a text generation task on any model in Huggingface that have inference API. Text (plain, long)
Text (formatted, long)
Text (formatted, long, with summary)
Huggingface Text To Image Generate an image from a prompt using a Huggingface model, including finetuned ones. Image

Help improve this page

Page status: No known problems

You can: