Skip to content

May I ask how to set the HF_TOKEN on the browser side? #1316

Open
@dengbupapapa

Description

@dengbupapapa

Question

May I ask how to set the HF_TOKEN on the browser side?

Image

The following is my code:

const model = await AutoModel.from_pretrained("briaai/RMBG-2.0", {
  config: {
    model_type: "custom", 
  },
  headers: {
    'Authorization': `Bearer hf_xxxxxxxxxxxxxxx`
  }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions