xxx1 commited on
Commit
6193207
1 Parent(s): f2977fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,8 +20,8 @@ cap_model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-
20
 
21
  def caption(input_image):
22
  inputs = cap_processor(input_image, return_tensors="pt")
23
- inputs["num_beams"] = 4
24
- inputs['num_return_sequences'] =4
25
  out = cap_model.generate(**inputs)
26
  return "\n".join(cap_processor.batch_decode(out, skip_special_tokens=True))
27
  import openai
 
20
 
21
  def caption(input_image):
22
  inputs = cap_processor(input_image, return_tensors="pt")
23
+ inputs["num_beams"] = 1
24
+ inputs['num_return_sequences'] =1
25
  out = cap_model.generate(**inputs)
26
  return "\n".join(cap_processor.batch_decode(out, skip_special_tokens=True))
27
  import openai