Commit
•
8373082
1
Parent(s):
b78d959
update pipeline tag
Browse files
README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
---
|
2 |
language:
|
3 |
- en
|
4 |
-
pipeline_tag: image-to-text
|
5 |
inference: false
|
6 |
arxiv: 2304.08485
|
7 |
license: llama2
|
@@ -51,7 +51,7 @@ pipe = pipeline("image-to-text", model=model_id)
|
|
51 |
url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg"
|
52 |
image = Image.open(requests.get(url, stream=True).raw)
|
53 |
|
54 |
-
# Define a chat
|
55 |
# Each value in "content" has to be a list of dicts with types ("text", "image")
|
56 |
conversation = [
|
57 |
{
|
@@ -90,7 +90,7 @@ model = LlavaForConditionalGeneration.from_pretrained(
|
|
90 |
|
91 |
processor = AutoProcessor.from_pretrained(model_id)
|
92 |
|
93 |
-
# Define a chat
|
94 |
# Each value in "content" has to be a list of dicts with types ("text", "image")
|
95 |
conversation = [
|
96 |
{
|
|
|
1 |
---
|
2 |
language:
|
3 |
- en
|
4 |
+
pipeline_tag: image-text-to-text
|
5 |
inference: false
|
6 |
arxiv: 2304.08485
|
7 |
license: llama2
|
|
|
51 |
url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg"
|
52 |
image = Image.open(requests.get(url, stream=True).raw)
|
53 |
|
54 |
+
# Define a chat history and use `apply_chat_template` to get correctly formatted prompt
|
55 |
# Each value in "content" has to be a list of dicts with types ("text", "image")
|
56 |
conversation = [
|
57 |
{
|
|
|
90 |
|
91 |
processor = AutoProcessor.from_pretrained(model_id)
|
92 |
|
93 |
+
# Define a chat history and use `apply_chat_template` to get correctly formatted prompt
|
94 |
# Each value in "content" has to be a list of dicts with types ("text", "image")
|
95 |
conversation = [
|
96 |
{
|