xxx1 commited on
Commit
ca9d990
1 Parent(s): c9c9416

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -68,11 +68,14 @@ def gpt3_short(question,vqa_answer,caption):
68
  return answer
69
  def gpt3_long(question,vqa_answer,caption):
70
  vqa_answer,vqa_score=vqa_answer
 
 
 
 
71
  prompt="prompt: This is the caption of a picture: "+caption+". Question: "+question+" VQA model predicts:"+"A: "+vqa_answer[0]+"socre:"+str(vqa_score[0])+\
72
  " B: "+vqa_answer[1]+" score:"+str(vqa_score[1])+" C: "+vqa_answer[2]+" score:"+str(vqa_score[2])+\
73
  " D: "+vqa_answer[3]+'score:'+str(vqa_score[3])+\
74
- "Tell me the right answer with a long sentence."
75
-
76
  # prompt=caption+"\n"+question+"\n"+vqa_answer+"\n Tell me the right answer."
77
  response = openai.Completion.create(
78
  engine="text-davinci-003",
 
68
  return answer
69
  def gpt3_long(question,vqa_answer,caption):
70
  vqa_answer,vqa_score=vqa_answer
71
+ # prompt="prompt: This is the caption of a picture: "+caption+". Question: "+question+" VQA model predicts:"+"A: "+vqa_answer[0]+"socre:"+str(vqa_score[0])+\
72
+ # " B: "+vqa_answer[1]+" score:"+str(vqa_score[1])+" C: "+vqa_answer[2]+" score:"+str(vqa_score[2])+\
73
+ # " D: "+vqa_answer[3]+'score:'+str(vqa_score[3])+\
74
+ # "Tell me the right answer with a long sentence."
75
  prompt="prompt: This is the caption of a picture: "+caption+". Question: "+question+" VQA model predicts:"+"A: "+vqa_answer[0]+"socre:"+str(vqa_score[0])+\
76
  " B: "+vqa_answer[1]+" score:"+str(vqa_score[1])+" C: "+vqa_answer[2]+" score:"+str(vqa_score[2])+\
77
  " D: "+vqa_answer[3]+'score:'+str(vqa_score[3])+\
78
+ "Tell me the right answer."
 
79
  # prompt=caption+"\n"+question+"\n"+vqa_answer+"\n Tell me the right answer."
80
  response = openai.Completion.create(
81
  engine="text-davinci-003",