Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,8 @@ def gpt3(question,vqa_answer,caption):
|
|
50 |
|
51 |
def vle(input_image,input_text):
|
52 |
vqa_answers = vqa_pipeline({"image":input_image, "question":input_text}, top_k=4)
|
53 |
-
return [" ".join([str(value) for key,value in vqa.items()] )for vqa in vqa_answers]
|
|
|
54 |
def inference_chat(input_image,input_text):
|
55 |
cap=caption(input_image)
|
56 |
# inputs = processor(images=input_image, text=input_text,return_tensors="pt")
|
|
|
50 |
|
51 |
def vle(input_image,input_text):
|
52 |
vqa_answers = vqa_pipeline({"image":input_image, "question":input_text}, top_k=4)
|
53 |
+
# return [" ".join([str(value) for key,value in vqa.items()] )for vqa in vqa_answers]
|
54 |
+
return [vqa['answer'] for vqa in vqa_answers]
|
55 |
def inference_chat(input_image,input_text):
|
56 |
cap=caption(input_image)
|
57 |
# inputs = processor(images=input_image, text=input_text,return_tensors="pt")
|