Workflows
Blocks
Integrations
Hugging Face

Hugging Face

The Hugging Face block runs machine-learning tasks through the Hugging Face Inference API — classify or summarize text, translate, answer questions, extract entities, caption images, and detect objects, straight from your workflow.

AI Building Blocks: Each task uses a curated default model, so it works out of the box. Power users can override the model with any compatible model ID from the Hugging Face Hub — including their own fine-tuned models.

Key Features

  • Seven Ready-Made Tasks: Text and vision tasks with sensible default models
  • Model Override: Optionally point a task at any model ID from the Hugging Face Hub
  • Variable Support: Feed text, questions, and image URLs from earlier blocks
  • Response Mapping: Save the result (or a specific part of it) into workflow variables
  • Automatic Retries: If a model is still loading, the block waits and retries before failing

Task Types

TaskSetting labelInput fieldsWhat you get back
text-classificationClassify textTextLabels with confidence scores (e.g. positive / negative)
summarizationSummarize textTextA short summary
translationTranslate textText, Target LanguageThe translated text
question-answeringAnswer questionsQuestion, ContextThe answer found in the context
token-classificationExtract named entitiesTextNamed entities (people, places, organizations)
image-to-textCaption imageImage URLA caption describing the image
object-detectionDetect objectsImage URLDetected objects with labels and positions

Available target languages for translation: French, Spanish, German, Chinese, Hindi, Arabic, Portuguese, Italian, Russian, and Japanese.


Configuration

ParameterTypeRequiredDescription
Hugging Face accountCredentialYesYour API token connection
Task TypeSelectYesOne of the seven tasks above
ModelTextNoOptional model ID from the Hugging Face Hub to override the task's default
TextTextText tasksThe input text; supports {{variables}}
Question / ContextTextQuestion answeringThe question, and the paragraph to search for the answer
Target LanguageSelectTranslationThe language to translate into
Image URLTextVision tasksPublic URL of the image to analyze
Execution ResultVariable mappingNoSave the result into workflow variables

Setting up the credential

  1. Sign in at huggingface.co (opens in a new tab) and open Settings → Access Tokens.
  2. Create a token (a Read token is enough for inference) and copy it.
  3. In the block settings, click to add a Hugging Face account.
  4. Enter a label and paste the API Token, then save.

Example: multilingual review triage

  1. A Webhook Trigger receives a product review.
  2. A Hugging Face block with Translate text (target: English) translates {{review_text}}.
  3. A second Hugging Face block with Classify text scores the sentiment of the translation.
  4. A Condition block routes negative reviews to a Slack alert for the support team.

Output

The block returns the model's result for the selected task — for example, an array of { label, score } pairs for classification, { summary_text } for summarization, the translated string for translation, and { answer, score } for question answering. Use the Execution Result mapping to store the result in a variable; you can also map a specific path inside the response body to extract just the part you need.

⚠️

Models on the free Inference API may take a moment to load on first use. The block retries automatically, but if you see a "model is still loading" error, wait about 30 seconds and run again.

Indite Documentation v1.7.1
PrivacyTermsSupport