ILLA home page
  1. Hugging Face Endpoint

허깅 얼굴 추론 엔드포인트를 사용하면 트랜스포머, 디퓨저 또는 모든 모델을 완전 관리형 전용 인프라에 쉽게 배포할 수 있습니다. 엔드포인트를 만들려면 여기를 클릭하세요.

허깅 페이스 엔드포인트 리소스 만들기

허깅 페이스 엔드포인트 리소스를 추가하는 방법에는 두 가지가 있습니다.

  1. ‘ILLA 빌더’ 입력 >> ‘리소스’ 탭 클릭 >> ‘새로 만들기’ 클릭 >> ‘허깅 페이스 엔드포인트’ 선택 >> 연결 정보 구성 후 ‘리소스 저장’을 클릭합니다.
  2. 편집 페이지로 진입 >> 작업 목록에서 ’+ 신규’ 클릭 >> ‘허깅 페이스 엔드포인트’ 선택 >> 연결 정보를 구성하거나 ’+ 새 리소스’를 클릭하여 새 연결 정보를 추가합니다.

연결 정보 구성

속성필수설명
이름필수ILLA에 표시할 리소스 이름을 정의합니다.
엔드포인트 URL필수create Endpoint here: https://ui.endpoints.huggingface.co/new and get the URL.
Token필수The organization token. You can get it in https://huggingface.co/settings/tokens.

Create Actions

Enter the edit page >> click + New in the action list >> Choose Hugging Face Endpoint >> Choose an existing resource or add a new resource

Configure actions

PropertiesRequiredDescription
Parameter typerequiredThe parameter type of your Endpoint. For example, if your Endpoint needs an text input, choose fill in “inputs” parameter with text. If your Endpoint needs an JSON input, choose fill in “inputs” parameter with JSON or key-value.
ParameterrequiredEnter your parameter. Use {{ componentName.value }} to use data of components.

Use case

We have deployed openai/whisper-base which gets an audio file input and converts into text. It is suitable for meeting minutes, podcasts to text, etc. Next we will introduce how to use this model to build an application in ILLA Cloud.

Step 1: Build the front-end interface with components

We have built an interface using the components such as file upload and button, as follows.

Step 2: Add a Hugging Face resource

Fill in the fields shown below to finish the resource configuration. Create an Endpoint and get the Endpoint URL. And get the organization API token in profile settings.

Step 3: Configure an Action

Select a parameter type first. Take openai/whisper-base as an example, this model requires binary file input so we change the parameter to Binary.

Set the binary to be passed to the model as the file data uploaded from the file upload component. For example, {{upload1.value[0]}}

Step 4: Connect the components and actions

Add an event handler to the button to trigger the action run when the button is clicked. And set the value of text component to {{whisper.data[0].text}} to display the convert result on text component.

After the above steps are configured, the application is created and the running results are as follows.