JunnanLi commited on
Commit
f16c093
1 Parent(s): 7dc3722

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -52,7 +52,7 @@ def inference(raw_image, model_n, question, strategy):
52
  if strategy == "Beam search":
53
  caption = model.generate(image, sample=False, num_beams=3, max_length=20, min_length=5)
54
  else:
55
- caption = model.generate(image, sample=True, top_p=0.95, max_length=20, min_length=5)
56
  return 'caption: '+caption[0]
57
 
58
  else:
 
52
  if strategy == "Beam search":
53
  caption = model.generate(image, sample=False, num_beams=3, max_length=20, min_length=5)
54
  else:
55
+ caption = model.generate(image, sample=True, top_p=0.9, max_length=20, min_length=5)
56
  return 'caption: '+caption[0]
57
 
58
  else: