Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def caption(input_image):
|
|
23 |
inputs["num_beams"] = 4
|
24 |
inputs['num_return_sequences'] =4
|
25 |
out = cap_model.generate(**inputs)
|
26 |
-
return "\n".join(cap_processor.
|
27 |
import openai
|
28 |
openai.api_key="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"
|
29 |
def gpt3(question,vqa_answer,caption):
|
|
|
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
|
28 |
openai.api_key="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"
|
29 |
def gpt3(question,vqa_answer,caption):
|