mestvnvo commited on
Commit
2ef3d5b
·
1 Parent(s): 265a6b8

num_beams and do_sample not valid args

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -15,8 +15,7 @@ def get_image_caption(image):
15
  image = image.convert("RGB")
16
 
17
  # max_new_tokens: limit tokens to trade detail for speed
18
- # num beams: usually 4, for diversity; 1 for greedy decoding
19
- result = pipe(image,text="The person is", max_new_tokens=32, num_beams=1, do_sample=False)
20
  return result[0]['generated_text']
21
 
22
  # api w/ gradio
 
15
  image = image.convert("RGB")
16
 
17
  # max_new_tokens: limit tokens to trade detail for speed
18
+ result = pipe(image,text="The person is", max_new_tokens=32)
 
19
  return result[0]['generated_text']
20
 
21
  # api w/ gradio