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