Hugging Face
Introduction
In this guide we'll walk through the process of linking Cerb to Hugging Face. You'll be able to use Hugging Face's full API in Cerb automations.
Get a Hugging Face API key
Log in to your Hugging Face Account or sign up if you don't already have one.
Choose Access Tokens in the menu and then click the "Create new token" button in the top right.
Name the key (eg. cerb
), select the proper token type and permissions for your uses, and click Create token.
Copy the token for use later.
Create the Hugging Face service in Cerb
-
Navigate to Search » Connected Services.
-
Click the (+) icon in the top right of the list.
-
Select Hugging Face.
-
Paste the access token you copied earlier in the API Key field.
-
Click the Create button.
Examples
Search models
https://huggingface.co/docs/hub/api#get-apimodels
start:
set:
params:
search: whisper
http.request/models:
output: http_response
inputs:
method: GET
url: https://huggingface.co/api/models/?{{params|url_encode}}
authentication: cerb:connected_account:huggingface
on_success:
set:
response@json: {{http_response.body}}
http_response@json: null