Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,8 @@ def caption(input_image):
|
|
25 |
out = cap_model.generate(**inputs)
|
26 |
return "\n".join(cap_processor.batch_decode(out, skip_special_tokens=True))
|
27 |
import openai
|
28 |
-
|
|
|
29 |
def gpt3(question,vqa_answer,caption):
|
30 |
prompt=caption+"\n"+question+"\n"+vqa_answer+"\n Tell me the right answer."
|
31 |
response = openai.Completion.create(
|
|
|
25 |
out = cap_model.generate(**inputs)
|
26 |
return "\n".join(cap_processor.batch_decode(out, skip_special_tokens=True))
|
27 |
import openai
|
28 |
+
import os
|
29 |
+
openai.api_key= os.getenv('openai_appkey') #"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"
|
30 |
def gpt3(question,vqa_answer,caption):
|
31 |
prompt=caption+"\n"+question+"\n"+vqa_answer+"\n Tell me the right answer."
|
32 |
response = openai.Completion.create(
|