mirror of
https://github.com/brycedrennan/imaginAIry
synced 2024-10-31 03:20:40 +00:00
fix: changed sample to True to generate caption using blip model
This commit is contained in:
parent
95d3d08d27
commit
94728d978e
@ -57,6 +57,6 @@ def generate_caption(image, min_length=30):
|
||||
|
||||
with torch.no_grad():
|
||||
caption = blip_model().generate(
|
||||
gpu_image, sample=False, num_beams=3, max_length=80, min_length=min_length
|
||||
gpu_image, sample=True, num_beams=3, max_length=80, min_length=min_length
|
||||
)
|
||||
return caption[0]
|
||||
|
Loading…
Reference in New Issue
Block a user