Update README.md
Browse files
README.md
CHANGED
@@ -14,6 +14,9 @@ The way to download and run this:
|
|
14 |
```python
|
15 |
from transformers import pipeline
|
16 |
image_captioner = pipeline("image-to-text", model="sadassa17/rgb-language_cap", max_new_tokens=200)
|
|
|
|
|
|
|
17 |
```
|
18 |
|
19 |
The model is trained to produce as many words as possible with a maximum of 200 tokens, which translates to roughly 5 sentences, while the 6th sentence is usually cropped.
|
|
|
14 |
```python
|
15 |
from transformers import pipeline
|
16 |
image_captioner = pipeline("image-to-text", model="sadassa17/rgb-language_cap", max_new_tokens=200)
|
17 |
+
filename = 'path/to/file'
|
18 |
+
generated_captions = image_captioner(filename)
|
19 |
+
print(generated_captions)
|
20 |
```
|
21 |
|
22 |
The model is trained to produce as many words as possible with a maximum of 200 tokens, which translates to roughly 5 sentences, while the 6th sentence is usually cropped.
|