Update README.md
This commit is contained in:
parent
eced05e91b
commit
fa4fd3b523
|
@ -48,14 +48,12 @@ inputs = processor(raw_image, text, return_tensors="pt")
|
||||||
|
|
||||||
out = model.generate(**inputs)
|
out = model.generate(**inputs)
|
||||||
print(processor.decode(out[0], skip_special_tokens=True))
|
print(processor.decode(out[0], skip_special_tokens=True))
|
||||||
# >>> a photography of a woman and her dog
|
|
||||||
|
|
||||||
# unconditional image captioning
|
# unconditional image captioning
|
||||||
inputs = processor(raw_image, return_tensors="pt")
|
inputs = processor(raw_image, return_tensors="pt")
|
||||||
|
|
||||||
out = model.generate(**inputs)
|
out = model.generate(**inputs)
|
||||||
print(processor.decode(out[0], skip_special_tokens=True))
|
print(processor.decode(out[0], skip_special_tokens=True))
|
||||||
>>> a woman sitting on the beach with her dog
|
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
@ -83,14 +81,12 @@ inputs = processor(raw_image, text, return_tensors="pt").to("cuda")
|
||||||
|
|
||||||
out = model.generate(**inputs)
|
out = model.generate(**inputs)
|
||||||
print(processor.decode(out[0], skip_special_tokens=True))
|
print(processor.decode(out[0], skip_special_tokens=True))
|
||||||
# >>> a photography of a woman and her dog
|
|
||||||
|
|
||||||
# unconditional image captioning
|
# unconditional image captioning
|
||||||
inputs = processor(raw_image, return_tensors="pt").to("cuda")
|
inputs = processor(raw_image, return_tensors="pt").to("cuda")
|
||||||
|
|
||||||
out = model.generate(**inputs)
|
out = model.generate(**inputs)
|
||||||
print(processor.decode(out[0], skip_special_tokens=True))
|
print(processor.decode(out[0], skip_special_tokens=True))
|
||||||
>>> a woman sitting on the beach with her dog
|
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue