cooelf commited on
Commit
c258b27
·
1 Parent(s): 5e7e5e9
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -40,7 +40,7 @@ def inference_chat(input_image,input_text):
40
  )
41
  gpt3_out = tokenizer.batch_decode(rationale, skip_special_tokens=True)[0]
42
  gpt3_out1 = gpt3_out
43
- return out[0][0], gpt3_out,gpt3_out1
44
 
45
 
46
  title = """# VQA with VLE and LLM"""
@@ -109,7 +109,8 @@ with gr.Blocks(
109
  ],
110
  [caption_output,gpt3_output_v1,caption_output_v1],
111
  )
112
- examples=[['api/61.png',"Think about the magnetic force between the magnets in each pair. Which of the following statements is true?","The images below show two pairs of magnets. The magnets in different pairs do not affect each other. All the magnets shown are made of the same material, but some of them are different sizes and shapes.","(A) The magnitude of the magnetic force is the same in both pairs. (B) The magnitude of the magnetic force is smaller in Pair 1. (C) The magnitude of the magnetic force is smaller in Pair 2.","Magnet sizes affect the magnitude of the magnetic force. Imagine magnets that are the same shape and made of the same material. The smaller the magnets, the smaller the magnitude of the magnetic force between them.nMagnet A is the same size in both pairs. But Magnet B is smaller in Pair 2 than in Pair 1. So, the magnitude of the magnetic force is smaller in Pair 2 than in Pair 1."],
 
113
  examples = gr.Examples(
114
  examples=examples,inputs=[image_input, chat_input,caption_output,caption_output_v1,gpt3_output_v1],
115
  )
 
40
  )
41
  gpt3_out = tokenizer.batch_decode(rationale, skip_special_tokens=True)[0]
42
  gpt3_out1 = gpt3_out
43
+ return gpt3_out, gpt3_out,gpt3_out1
44
 
45
 
46
  title = """# VQA with VLE and LLM"""
 
109
  ],
110
  [caption_output,gpt3_output_v1,caption_output_v1],
111
  )
112
+ examples=[['api/61.png',"Question: Think about the magnetic force between the magnets in each pair. Which of the following statements is true?\nContext: The images below show two pairs of magnets. The magnets in different pairs do not affect each other. All the magnets shown are made of the same material, but some of them are different sizes and shapes.\nOptions: (A) The magnitude of the magnetic force is the same in both pairs. (B) The magnitude of the magnetic force is smaller in Pair 1. (C) The magnitude of the magnetic force is smaller in Pair 2.\nSolution:","2","2","2"],
113
+ ]
114
  examples = gr.Examples(
115
  examples=examples,inputs=[image_input, chat_input,caption_output,caption_output_v1,gpt3_output_v1],
116
  )