Skip to content

Commit

Permalink
Document vision chat completion with Llama 3.2 11B V (#2569)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin authored Sep 26, 2024
1 parent 12ec449 commit 2157c7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/huggingface_hub/inference/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ def chat_completion(
... base64_image = base64.b64encode(f.read()).decode("utf-8")
>>> image_url = f"data:image/jpeg;base64,{base64_image}"
>>> client = InferenceClient("HuggingFaceM4/idefics2-8b-chatty")
>>> client = InferenceClient("meta-llama/Llama-3.2-11B-Vision-Instruct")
>>> output = client.chat.completions.create(
... messages=[
... {
Expand All @@ -734,7 +734,7 @@ def chat_completion(
... ],
... )
>>> output
A determine figure of Lady Liberty stands tall, holding a torch aloft, atop a pedestal on an island.
The image depicts the iconic Statue of Liberty situated in New York Harbor, New York, on a clear day.
```
Example using tools:
Expand Down
4 changes: 2 additions & 2 deletions src/huggingface_hub/inference/_generated/_async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ async def chat_completion(
... base64_image = base64.b64encode(f.read()).decode("utf-8")
>>> image_url = f"data:image/jpeg;base64,{base64_image}"
>>> client = AsyncInferenceClient("HuggingFaceM4/idefics2-8b-chatty")
>>> client = AsyncInferenceClient("meta-llama/Llama-3.2-11B-Vision-Instruct")
>>> output = await client.chat.completions.create(
... messages=[
... {
Expand All @@ -773,7 +773,7 @@ async def chat_completion(
... ],
... )
>>> output
A determine figure of Lady Liberty stands tall, holding a torch aloft, atop a pedestal on an island.
The image depicts the iconic Statue of Liberty situated in New York Harbor, New York, on a clear day.
```
Example using tools:
Expand Down

0 comments on commit 2157c7c

Please sign in to comment.