Update README.md
Browse files
README.md
CHANGED
|
@@ -27,7 +27,8 @@ pip install promptcap
|
|
| 27 |
## Captioning Pipeline
|
| 28 |
|
| 29 |
Please follow the prompt format, which will give the best performance.
|
| 30 |
-
|
|
|
|
| 31 |
```python
|
| 32 |
import torch
|
| 33 |
from promptcap import PromptCap
|
|
@@ -85,7 +86,7 @@ question = "what year was this taken?"
|
|
| 85 |
image = "dvds.jpg"
|
| 86 |
ocr = "yip AE Mht juor 02/14/2012"
|
| 87 |
|
| 88 |
-
print(vqa_model.vqa(
|
| 89 |
```
|
| 90 |
|
| 91 |
Because of the flexibility of Unifiedqa, PromptCap also supports multiple-choice VQA
|
|
|
|
| 27 |
## Captioning Pipeline
|
| 28 |
|
| 29 |
Please follow the prompt format, which will give the best performance.
|
| 30 |
+
|
| 31 |
+
Generate a prompt-guided caption by following:
|
| 32 |
```python
|
| 33 |
import torch
|
| 34 |
from promptcap import PromptCap
|
|
|
|
| 86 |
image = "dvds.jpg"
|
| 87 |
ocr = "yip AE Mht juor 02/14/2012"
|
| 88 |
|
| 89 |
+
print(vqa_model.vqa(question, image, ocr=ocr))
|
| 90 |
```
|
| 91 |
|
| 92 |
Because of the flexibility of Unifiedqa, PromptCap also supports multiple-choice VQA
|