Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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"] =
|
24 |
-
inputs['num_return_sequences'] =
|
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
|