Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,114 @@ def vqa_main(image, question):
|
|
55 |
# Home page text
|
56 |
title = "Interactive demo: Multilingual VQA"
|
57 |
description = "Demo for Multilingual VQA. Upload an image, type a question, click 'submit', or click one of the examples to load them."
|
58 |
-
article = "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
# Load example images
|
61 |
torch.hub.download_url_to_file('http://farm3.staticflickr.com/2710/4520550856_7a9f9ea59d_z.jpg', 'apple.jpg')
|
|
|
55 |
# Home page text
|
56 |
title = "Interactive demo: Multilingual VQA"
|
57 |
description = "Demo for Multilingual VQA. Upload an image, type a question, click 'submit', or click one of the examples to load them."
|
58 |
+
article = "Supported Languages:
|
59 |
+
'af': 'afrikaans',
|
60 |
+
'sq': 'albanian',
|
61 |
+
'am': 'amharic',
|
62 |
+
'ar': 'arabic',
|
63 |
+
'hy': 'armenian',
|
64 |
+
'az': 'azerbaijani',
|
65 |
+
'eu': 'basque',
|
66 |
+
'be': 'belarusian',
|
67 |
+
'bn': 'bengali',
|
68 |
+
'bs': 'bosnian',
|
69 |
+
'bg': 'bulgarian',
|
70 |
+
'ca': 'catalan',
|
71 |
+
'ceb': 'cebuano',
|
72 |
+
'ny': 'chichewa',
|
73 |
+
'zh-cn': 'chinese (simplified)',
|
74 |
+
'zh-tw': 'chinese (traditional)',
|
75 |
+
'co': 'corsican',
|
76 |
+
'hr': 'croatian',
|
77 |
+
'cs': 'czech',
|
78 |
+
'da': 'danish',
|
79 |
+
'nl': 'dutch',
|
80 |
+
'en': 'english',
|
81 |
+
'eo': 'esperanto',
|
82 |
+
'et': 'estonian',
|
83 |
+
'tl': 'filipino',
|
84 |
+
'fi': 'finnish',
|
85 |
+
'fr': 'french',
|
86 |
+
'fy': 'frisian',
|
87 |
+
'gl': 'galician',
|
88 |
+
'ka': 'georgian',
|
89 |
+
'de': 'german',
|
90 |
+
'el': 'greek',
|
91 |
+
'gu': 'gujarati',
|
92 |
+
'ht': 'haitian creole',
|
93 |
+
'ha': 'hausa',
|
94 |
+
'haw': 'hawaiian',
|
95 |
+
'iw': 'hebrew',
|
96 |
+
'he': 'hebrew',
|
97 |
+
'hi': 'hindi',
|
98 |
+
'hmn': 'hmong',
|
99 |
+
'hu': 'hungarian',
|
100 |
+
'is': 'icelandic',
|
101 |
+
'ig': 'igbo',
|
102 |
+
'id': 'indonesian',
|
103 |
+
'ga': 'irish',
|
104 |
+
'it': 'italian',
|
105 |
+
'ja': 'japanese',
|
106 |
+
'jw': 'javanese',
|
107 |
+
'kn': 'kannada',
|
108 |
+
'kk': 'kazakh',
|
109 |
+
'km': 'khmer',
|
110 |
+
'ko': 'korean',
|
111 |
+
'ku': 'kurdish (kurmanji)',
|
112 |
+
'ky': 'kyrgyz',
|
113 |
+
'lo': 'lao',
|
114 |
+
'la': 'latin',
|
115 |
+
'lv': 'latvian',
|
116 |
+
'lt': 'lithuanian',
|
117 |
+
'lb': 'luxembourgish',
|
118 |
+
'mk': 'macedonian',
|
119 |
+
'mg': 'malagasy',
|
120 |
+
'ms': 'malay',
|
121 |
+
'ml': 'malayalam',
|
122 |
+
'mt': 'maltese',
|
123 |
+
'mi': 'maori',
|
124 |
+
'mr': 'marathi',
|
125 |
+
'mn': 'mongolian',
|
126 |
+
'my': 'myanmar (burmese)',
|
127 |
+
'ne': 'nepali',
|
128 |
+
'no': 'norwegian',
|
129 |
+
'or': 'odia',
|
130 |
+
'ps': 'pashto',
|
131 |
+
'fa': 'persian',
|
132 |
+
'pl': 'polish',
|
133 |
+
'pt': 'portuguese',
|
134 |
+
'pa': 'punjabi',
|
135 |
+
'ro': 'romanian',
|
136 |
+
'ru': 'russian',
|
137 |
+
'sm': 'samoan',
|
138 |
+
'gd': 'scots gaelic',
|
139 |
+
'sr': 'serbian',
|
140 |
+
'st': 'sesotho',
|
141 |
+
'sn': 'shona',
|
142 |
+
'sd': 'sindhi',
|
143 |
+
'si': 'sinhala',
|
144 |
+
'sk': 'slovak',
|
145 |
+
'sl': 'slovenian',
|
146 |
+
'so': 'somali',
|
147 |
+
'es': 'spanish',
|
148 |
+
'su': 'sundanese',
|
149 |
+
'sw': 'swahili',
|
150 |
+
'sv': 'swedish',
|
151 |
+
'tg': 'tajik',
|
152 |
+
'ta': 'tamil',
|
153 |
+
'te': 'telugu',
|
154 |
+
'th': 'thai',
|
155 |
+
'tr': 'turkish',
|
156 |
+
'uk': 'ukrainian',
|
157 |
+
'ur': 'urdu',
|
158 |
+
'ug': 'uyghur',
|
159 |
+
'uz': 'uzbek',
|
160 |
+
'vi': 'vietnamese',
|
161 |
+
'cy': 'welsh',
|
162 |
+
'xh': 'xhosa',
|
163 |
+
'yi': 'yiddish',
|
164 |
+
'yo': 'yoruba',
|
165 |
+
'zu': 'zulu',"
|
166 |
|
167 |
# Load example images
|
168 |
torch.hub.download_url_to_file('http://farm3.staticflickr.com/2710/4520550856_7a9f9ea59d_z.jpg', 'apple.jpg')
|