Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
72787c5b
Unverified
Commit
72787c5b
authored
Mar 01, 2023
by
Younes Belkada
Committed by
GitHub
Mar 01, 2023
Browse files
[`Blip`] Fix blip doctest (#21868)
fix blip doctest
parent
619d8318
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/models/blip/modeling_blip.py
src/transformers/models/blip/modeling_blip.py
+2
-1
No files found.
src/transformers/models/blip/modeling_blip.py
View file @
72787c5b
...
...
@@ -985,8 +985,9 @@ class BlipForConditionalGeneration(BlipPreTrainedModel):
>>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
>>> image = Image.open(requests.get(url, stream=True).raw)
>>> text = "A picture of"
>>> inputs = processor(images=image, return_tensors="pt")
>>> inputs = processor(images=image,
text=text,
return_tensors="pt")
>>> outputs = model(**inputs)
```"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment