I'm totally new to the Hugging Face API and I'm trying to figure out the number of labels I can pass in a single API call. The reason I ask this is I tried using 5 labels some time back and it was giving me an error, but now when I tried with 40 labels it worked perfectly fine. So is there a limit at all for the number of labels in the multi-label approach?
The code is as follows-
payload = json.dumps(
{"inputs": corpus
,"parameters": {"candidate_labels": keywords, "multi_class": True}
})
headers = {
'Authorization': ':)',
'Content-Type': 'application/json'
}
api_response = requests.request("POST", API_URL, headers=headers, data=payload)
Thank You!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…