Hugging Face: Authentication action

To authenticate access to Hugging Face from the Control Room you need to obtain the Access token.

Prerequisites

Note: The examples and graphics provided on this page are for representation purposes only and may not accurately reflect your specific instance. We do not assume responsibility for their maintenance or accuracy.
  • You must have the Bot creator role to use the Hugging Face: Authentication action in a bot.
  • Create a Hugging Face account. You can create an account here Create a Hugging Face account.

This topic describes the steps to use the token acquired from Hugging Face in the Control Room to authenticate. You must first authenticate before using the Serverless Inference action to seamlessly integrate Hugging Face models into your automation workflows and leverage their capabilities for various NLP tasks.

Procedure

  1. Log in to your Hugging Face account.
  2. Navigate to the Access Tokens.
  3. Click on +Create new token.
  4. Select a Token type. For most automation tasks, you will likely need at least Read token.
  5. Give your token a descriptive name.
  6. Click Create token. Watch the following video to learn how to create an Access token.

  7. Log in to the Control Room.
  8. Create a new bot. For more details, see Create your first bot.
  9. From the Actions pane, select AI > Hugging Face > Authentication and place it under the Start of the bot flow.
    1. In the Access token field, paste the Access token copied from your Hugging Face instance.
      Note: You can use one of the following options to specify the Access token:
      • Credential: To implement stronger security, you can use values in the Credential Vault that contains information about the Access Token (optional).
      • Variable: To implement stronger security, you can use a credential variable that contains information about the Access token (optional).
      • Insecure string: Enables you to enter the Access token (optional).
      Hugging Face Authentication action
    2. Select any one of the following tabs to create an AI session:
      • Local session: Specify a session name that can be used only in the current bot.
      • Global session: Specify a session name that can be used across multiple bots, such as parent bots and child bots.
        Recommendation: The parent and child bots should have the same package version.
      • Variable: Specify or create a session variable of subtype AI session.
    3. Enter Default as the session name to limit the session to the current session.
  10. Click Run to ensure you are successfully authenticated.