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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- openai.api_key="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"
 
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(