Spaces:
Running
Running
Irpan
commited on
Commit
·
db445c5
1
Parent(s):
72a284b
app.py
CHANGED
@@ -98,6 +98,7 @@ def main(image, text):
|
|
98 |
vqa_answer = vqa(image, cleaned_sentence)
|
99 |
llm_answer = llm(cleaned_sentence, vqa_answer)
|
100 |
final_answer, _ = google_translate(llm_answer, dest=dest_lang)
|
|
|
101 |
return vqa_answer, final_answer
|
102 |
|
103 |
|
@@ -106,7 +107,9 @@ question = gr.Textbox(label="Question")
|
|
106 |
answer = gr.Textbox(label="Predicted answer")
|
107 |
examples = [
|
108 |
["monkeys.jpg", "What are the monkeys doing in French?"],
|
109 |
-
["apple.jpg", "Qu'est-ce que c'est dans ma main en anglais?"]
|
|
|
|
|
110 |
]
|
111 |
|
112 |
title = "Cross-lingual VQA"
|
|
|
98 |
vqa_answer = vqa(image, cleaned_sentence)
|
99 |
llm_answer = llm(cleaned_sentence, vqa_answer)
|
100 |
final_answer, _ = google_translate(llm_answer, dest=dest_lang)
|
101 |
+
print("Final answer: ", final_answer)
|
102 |
return vqa_answer, final_answer
|
103 |
|
104 |
|
|
|
107 |
answer = gr.Textbox(label="Predicted answer")
|
108 |
examples = [
|
109 |
["monkeys.jpg", "What are the monkeys doing in French?"],
|
110 |
+
["apple.jpg", "Qu'est-ce que c'est dans ma main en anglais?"],
|
111 |
+
["monkeys.jpg", "In Chinese, tell me how many monkeys are here?"],
|
112 |
+
["apple.jpg", "What color is this in Uyghur?"]
|
113 |
]
|
114 |
|
115 |
title = "Cross-lingual VQA"
|