|| You are trying to access a gated repo while using custom model using Inference API ||

#1
by Orcawise - opened
Owner

Hey I have build the EU AI act model on the top of google/gemma2b model. While i am using the below code for the inference using Serverless API

import requests

API_URL = "https://api-inference.huggingface.co/models/Orcawise/eu-ai-act-align"
headers = {"Authorization": "Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}

def query(payload):
    response = requests.post(API_URL, headers=headers, json=payload)
    return response.json()
    
output = query({
    "inputs": "Can you please let us know more details about your ",
})

I am getting the below response. I am not sure what is the reason behind it.

You are trying to access a gated repo. Make sure to request access at https://huggingface.co/google/gemma-2b and pass a token having permission to this repo either by logging in with `huggingface-cli login` or by passing `token=<your_token>`.

Sign up or log in to comment