HuggingFace Integration
Using HuggingFace Models in V7
V7 now provides you with a new, simpler way to register external models which are hosted on HuggingFace, through a single click.
Steps Needed
Step 1: Set up the Inference URL
Depending on the model from Hugging Face which you want to integrate into your workflow, you will be able to to obtain an API URL from Hugging Face itself which you will need to use in the Models page in Darwin.
Plug in the model URL into the URL section of the Models page, and you will obtain an automatic mapping between the classes.
Correct Endpoint
Please use the inference endpoint which starts with https://api-inference.huggingface.co/models/ and not the HuggingFace model's web page URL
Step 2: Upload a test image
Before using the model within the workflow, it's recommended to upload an image to test the inference endpoint. If the system detects any labels, they will be conveniently displayed next to the image, along with the model's output in JSON format.
Step 3: Register Classes
You have the option to automatically include classes that were identified by the model. Additionally, if any classes were not detected in the test image example, you can add them manually as well (in our image above the motorcycle class is missing since there happens to be no motorcycles in the image).
Step 4: Connect Model to your V7 workflow
Once the external Hugging Face model has been registered, you can:
- Add your model to the workflow using the model stage
- Annotate using your hugging face model using the model tool
Updated 7 months ago