huggingface_hub.errors.GenerationError: Request failed during generation: Server error: When trying to use Llama-3.2-11b-vision-instruct Serverless API
#50
by
Inoob
- opened
Yes, the output did not say whut error, it just said Server error: and then blank.
I am using a windows 11 environment with python 11 huggingface hub and Llama 3.2 11B Vision serverless interference
I tried to run this code (I entered my api_key, i just don't wanna expose it):
from huggingface_hub import InferenceClient
client = InferenceClient(api_key="hf_xxxxxxxxxxxxxxxxx")
image_url = "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
for message in client.chat_completion(
model="meta-llama/Llama-3.2-11B-Vision-Instruct",
messages=[
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": image_url}},
{"type": "text", "text": "Describe this image in one sentence."},
],
}
],
max_tokens=500,
stream=True,
):
print(message.choices[0].delta.content, end="")