Spaces:
Runtime error
Runtime error
Commit
•
6936744
1
Parent(s):
80225b5
Move examples to another app
Browse files- app.py +1 -0
- apps/article.py +0 -207
- apps/examples.py +210 -0
app.py
CHANGED
@@ -25,6 +25,7 @@ def main():
|
|
25 |
app.add_app("Article", article.app)
|
26 |
app.add_app("Visual Question Answering", vqa.app)
|
27 |
app.add_app("Mask Filling", mlm.app)
|
|
|
28 |
app.run()
|
29 |
state.sync()
|
30 |
|
|
|
25 |
app.add_app("Article", article.app)
|
26 |
app.add_app("Visual Question Answering", vqa.app)
|
27 |
app.add_app("Mask Filling", mlm.app)
|
28 |
+
app.add_app("Examples", mlm.app)
|
29 |
app.run()
|
30 |
state.sync()
|
31 |
|
apps/article.py
CHANGED
@@ -66,211 +66,4 @@ def app(state=None):
|
|
66 |
|
67 |
toc.header("Acknowledgements")
|
68 |
st.write(read_markdown("acknowledgements.md"))
|
69 |
-
|
70 |
-
toc.header("VQA Examples")
|
71 |
-
toc.subheader("Color Questions")
|
72 |
-
col1, col2, col3 = st.beta_columns([1,1,1])
|
73 |
-
|
74 |
-
col1.image("./sections/examples/men_riding_horses.jpeg", use_column_width="auto", width=300)
|
75 |
-
col1.write("**Custom Question**: What color are the horses?")
|
76 |
-
col1.write("**Predicted Answer**: brown✅")
|
77 |
-
|
78 |
-
col2.image("./sections/examples/cat_color.jpeg", use_column_width="auto", width=300)
|
79 |
-
col2.write("**Custom Question**: What color is the cat?")
|
80 |
-
col2.write("**Predicted Answer**: white✅")
|
81 |
-
|
82 |
-
col3.image("./sections/examples/men_happy.jpeg", use_column_width="auto", width=300)
|
83 |
-
col3.write("**Custom Question**: What color is the man's jacket?")
|
84 |
-
col3.write("**Predicted Answer**: black⚫")
|
85 |
-
|
86 |
-
col1.image("./sections/examples/car_color.jpeg", use_column_width="auto", width=300)
|
87 |
-
col1.write("**Actual Question**: What color is the car?")
|
88 |
-
col1.write("**Predicted Answer**: blue❎")
|
89 |
-
|
90 |
-
col2.image("./sections/examples/coat_color.jpeg", use_column_width="auto", width=300)
|
91 |
-
col2.write("**Actual Question**: What color is this person's coat?")
|
92 |
-
col2.write("**Predicted Answer**: blue✅")
|
93 |
-
|
94 |
-
toc.subheader("Counting Questions")
|
95 |
-
|
96 |
-
col1, col2, col3 = st.beta_columns([1,1, 1])
|
97 |
-
|
98 |
-
col1.image("./sections/examples/giraffe_zebra.jpeg", use_column_width="auto", width=300)
|
99 |
-
col1.write("**Actual Question**: How many zebras are there?")
|
100 |
-
col1.write("**Predicted Answer**: 0❎")
|
101 |
-
|
102 |
-
col2.image("./sections/examples/giraffe_zebra.jpeg", use_column_width="auto", width=300)
|
103 |
-
col2.write("**Custom Question**: How many giraffes are there?")
|
104 |
-
col2.write("**Predicted Answer**: 2❎")
|
105 |
-
|
106 |
-
col3.image("./sections/examples/teddy.jpeg", use_column_width="auto", width=300)
|
107 |
-
col3.write("**Custom Question**: How many teddy bears are present in the image?")
|
108 |
-
col3.write("**Predicted Answer**: 3✅")
|
109 |
-
|
110 |
-
col1.image("./sections/examples/candle_count.jpeg", use_column_width="auto", width=300)
|
111 |
-
col1.write("**Actual Question**: ¿Cuantas velas hay en el cupcake?")
|
112 |
-
col1.write("**English Translation**: How many candles are in the cupcake?")
|
113 |
-
col1.write("**Predicted Answer**: 0❎")
|
114 |
-
|
115 |
-
col1.image("./sections/examples/people_picture.jpeg", use_column_width="auto", width=300)
|
116 |
-
col1.write("**Actual Question**: ¿A cuánta gente le están tomando una foto?")
|
117 |
-
col1.write("**English Translation**: How many people are you taking a picture of?")
|
118 |
-
col1.write("**Predicted Answer**: 10❎")
|
119 |
-
|
120 |
-
toc.subheader("Size/Shape Questions")
|
121 |
-
col1, col2, col3 = st.beta_columns([1,1,1])
|
122 |
-
col1.image("./sections/examples/vase.jpeg", use_column_width="auto", width=300)
|
123 |
-
col1.write("**Actual Question**: What shape is the vase? ")
|
124 |
-
col1.write("**Predicted Answer**: round✅")
|
125 |
-
|
126 |
-
|
127 |
-
toc.subheader("Yes/No Questions")
|
128 |
-
col1, col2, col3 = st.beta_columns([1,1,1])
|
129 |
-
|
130 |
-
col1.image("./sections/examples/teddy.jpeg", use_column_width="auto", width=300)
|
131 |
-
col1.write("**Actual Question**: Sind das drei Teddybären?")
|
132 |
-
col1.write("**English Translation**: Are those teddy bears?")
|
133 |
-
col1.write("**Predicted Answer**: Ja (yes)✅")
|
134 |
-
|
135 |
-
col2.image("./sections/examples/winter.jpeg", use_column_width="auto", width=300)
|
136 |
-
col2.write("**Actual Question**: ¿Se lo tomaron en invierno?")
|
137 |
-
col2.write("**English Translation**: Did they take it in winter?")
|
138 |
-
col2.write("**Predicted Answer**: si (yes)✅")
|
139 |
-
|
140 |
-
col3.image("./sections/examples/clock.jpeg", use_column_width="auto", width=300)
|
141 |
-
col3.write("**Actual Question**: Is the clock ornate? ")
|
142 |
-
col3.write("**Predicted Answer**: yes✅")
|
143 |
-
|
144 |
-
col1.image("./sections/examples/decorated_building.jpeg", use_column_width="auto", width=300)
|
145 |
-
col1.write("**Actual Question**: Ist das Gebäude orniert?")
|
146 |
-
col1.write("**English Translation**: Is the building decorated?")
|
147 |
-
col1.write("**Predicted Answer**: Ja (yes)✅")
|
148 |
-
|
149 |
-
col2.image("./sections/examples/commuter_train.jpeg", use_column_width="auto", width=300)
|
150 |
-
col2.write("**Actual Question**: Ist das ein Pendler-Zug?")
|
151 |
-
col2.write("**English Translation**: Is that a commuter train?")
|
152 |
-
col2.write("**Predicted Answer**: Ja (yes)❎")
|
153 |
-
|
154 |
-
col3.image("./sections/examples/is_in_a_restaurant.jpeg", use_column_width="auto", width=300)
|
155 |
-
col3.write("**Actual Question**: Elle est dans un restaurant?")
|
156 |
-
col3.write("**English Translation**: Is she in a restaurant?")
|
157 |
-
col3.write("**Predicted Answer**: Oui (yes)❎")
|
158 |
-
|
159 |
-
col1.image("./sections/examples/giraffe_eyes.jpeg", use_column_width="auto", width=300)
|
160 |
-
col1.write("**Actual Question**: Est-ce que l'œil de la girafe est fermé?")
|
161 |
-
col1.write("**English Translation**: Are the giraffe's eyes closed?")
|
162 |
-
col1.write("**Predicted Answer**: Oui (yes)❎")
|
163 |
-
|
164 |
-
toc.subheader("Negatives Test")
|
165 |
-
col1, col2, col3 = st.beta_columns([1,1,1])
|
166 |
-
col1.image("./sections/examples/men_happy.jpeg", use_column_width="auto", width=300)
|
167 |
-
|
168 |
-
col2.write("**Actual Question**: Is the man happy?")
|
169 |
-
col2.write("**Predicted Answer**: Yes✅")
|
170 |
-
|
171 |
-
col3.write("**Actual Question**: Is the man not happy?")
|
172 |
-
col3.write("**Predicted Answer**: Yes❎")
|
173 |
-
|
174 |
-
col2.write("**Actual Question**: Is the man sad?")
|
175 |
-
col2.write("**Predicted Answer**: No✅")
|
176 |
-
|
177 |
-
col3.write("**Actual Question**: Is the man not sad?")
|
178 |
-
col3.write("**Predicted Answer**: No❎")
|
179 |
-
|
180 |
-
col2.write("**Actual Question**: Is the man unhappy?")
|
181 |
-
col2.write("**Predicted Answer**: No✅")
|
182 |
-
|
183 |
-
col3.write("**Actual Question**: Is the man not unhappy?")
|
184 |
-
col3.write("**Predicted Answer**: No❎")
|
185 |
-
|
186 |
-
toc.subheader("Multilinguality Test")
|
187 |
-
|
188 |
-
toc.subsubheader("Color Question")
|
189 |
-
col1, col2, col3 = st.beta_columns([1,1,1])
|
190 |
-
col1.image("./sections/examples/truck_color.jpeg", use_column_width="auto", width=300)
|
191 |
-
|
192 |
-
col2.write("**Actual Question**: What color is the building?")
|
193 |
-
col2.write("**Predicted Answer**: red✅")
|
194 |
-
|
195 |
-
col3.write("**Actual Question**: Welche Farbe hat das Gebäude?")
|
196 |
-
col3.write("**English Translation**: What color is the building?")
|
197 |
-
col3.write("**Predicted Answer**: rot (red)✅")
|
198 |
-
|
199 |
-
col2.write("**Actual Question**: ¿De qué color es el edificio?")
|
200 |
-
col2.write("**English Translation**: What color is the building?")
|
201 |
-
col2.write("**Predicted Answer**: rojo (red)✅")
|
202 |
-
|
203 |
-
col3.write("**Actual Question**: De quelle couleur est le bâtiment ?")
|
204 |
-
col3.write("**English Translation**: What color is the building?")
|
205 |
-
col3.write("**Predicted Answer**: rouge (red)✅")
|
206 |
-
|
207 |
-
toc.subsubheader("Counting Question")
|
208 |
-
col1, col2, col3 = st.beta_columns([1,1,1])
|
209 |
-
col1.image("./sections/examples/bear.jpeg", use_column_width="auto", width=300)
|
210 |
-
|
211 |
-
col2.write("**Actual Question**: How many bears do you see?")
|
212 |
-
col2.write("**Predicted Answer**: 1✅")
|
213 |
-
|
214 |
-
col3.write("**Actual Question**: Wie viele Bären siehst du?")
|
215 |
-
col3.write("**English Translation**: How many bears do you see?")
|
216 |
-
col3.write("**Predicted Answer**: 1✅")
|
217 |
-
|
218 |
-
col2.write("**Actual Question**: ¿Cuántos osos ves?")
|
219 |
-
col2.write("**English Translation**: How many bears do you see?")
|
220 |
-
col2.write("**Predicted Answer**: 1✅")
|
221 |
-
|
222 |
-
col3.write("**Actual Question**: Combien d'ours voyez-vous ?")
|
223 |
-
col3.write("**English Translation**: How many bears do you see?")
|
224 |
-
col3.write("**Predicted Answer**: 1✅")
|
225 |
-
|
226 |
-
toc.subsubheader("Misc Question")
|
227 |
-
col1, col2, col3 = st.beta_columns([1,1,1])
|
228 |
-
col1.image("./sections/examples/bench.jpeg", use_column_width="auto", width=300)
|
229 |
-
|
230 |
-
col2.write("**Actual Question**: Where is the bench?")
|
231 |
-
col2.write("**Predicted Answer**: field✅")
|
232 |
-
|
233 |
-
col3.write("**Actual Question**: Où est le banc ?")
|
234 |
-
col3.write("**English Translation**: Where is the bench?")
|
235 |
-
col3.write("**Predicted Answer**: domaine (field)✅")
|
236 |
-
|
237 |
-
col2.write("**Actual Question**: ¿Dónde está el banco?")
|
238 |
-
col2.write("**English Translation**: Where is the bench?")
|
239 |
-
col2.write("**Predicted Answer**: campo (field)✅")
|
240 |
-
|
241 |
-
col3.write("**Actual Question**: Wo ist die Bank?")
|
242 |
-
col3.write("**English Translation**: Where is the bench?")
|
243 |
-
col3.write("**Predicted Answer**: Feld (field)✅")
|
244 |
-
|
245 |
-
|
246 |
-
toc.subheader("Misc Questions")
|
247 |
-
col1, col2, col3 = st.beta_columns([1,1,1])
|
248 |
-
|
249 |
-
col1.image("./sections/examples/tennis.jpeg", use_column_width="auto", width=300)
|
250 |
-
col1.write("**Actual Question**: ¿Qué clase de juego está viendo la multitud?")
|
251 |
-
col1.write("**English Translation**: What kind of game is the crowd watching?")
|
252 |
-
col1.write("**Predicted Answer**: tenis (tennis)✅")
|
253 |
-
|
254 |
-
col2.image("./sections/examples/men_body_suits.jpeg", use_column_width="auto", width=300)
|
255 |
-
col2.write("**Custom Question**: What are the men wearing?")
|
256 |
-
col2.write("**Predicted Answer**: wetsuits✅")
|
257 |
-
|
258 |
-
col3.image("./sections/examples/bathroom.jpeg", use_column_width="auto", width=300)
|
259 |
-
col3.write("**Actual Question**: ¿A qué habitación perteneces?")
|
260 |
-
col3.write("**English Translation**: What room do you belong to?")
|
261 |
-
col3.write("**Predicted Answer**: bano (bathroom)✅")
|
262 |
-
|
263 |
-
col1.image("./sections/examples/men_riding_horses.jpeg", use_column_width="auto", width=300)
|
264 |
-
col1.write("**Custom Question**: What are the men riding?")
|
265 |
-
col1.write("**Predicted Answer**: horses✅")
|
266 |
-
|
267 |
-
col2.image("./sections/examples/inside_outside.jpeg", use_column_width="auto", width=300)
|
268 |
-
col2.write("**Actual Question**: Was this taken inside or outside?")
|
269 |
-
col2.write("**Predicted Answer**: inside✅")
|
270 |
-
|
271 |
-
col3.image("./sections/examples/dog_looking_at.jpeg", use_column_width="auto", width=300)
|
272 |
-
col3.write("**Actual Question**: Was guckt der Hund denn so?")
|
273 |
-
col3.write("**English Translation**: What is the dog looking at?")
|
274 |
-
col3.write("**Predicted Answer**: Frisbeescheibe (frisbee)❎")
|
275 |
-
|
276 |
toc.generate()
|
|
|
66 |
|
67 |
toc.header("Acknowledgements")
|
68 |
st.write(read_markdown("acknowledgements.md"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
toc.generate()
|
apps/examples.py
ADDED
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from .utils import Toc
|
3 |
+
def app(state=None):
|
4 |
+
toc = Toc()
|
5 |
+
|
6 |
+
toc.header("VQA Examples")
|
7 |
+
toc.subheader("Color Questions")
|
8 |
+
col1, col2, col3 = st.beta_columns([1,1,1])
|
9 |
+
|
10 |
+
col1.image("./sections/examples/men_riding_horses.jpeg", use_column_width="auto", width=300)
|
11 |
+
col1.write("**Custom Question**: What color are the horses?")
|
12 |
+
col1.write("**Predicted Answer**: brown✅")
|
13 |
+
|
14 |
+
col2.image("./sections/examples/cat_color.jpeg", use_column_width="auto", width=300)
|
15 |
+
col2.write("**Custom Question**: What color is the cat?")
|
16 |
+
col2.write("**Predicted Answer**: white✅")
|
17 |
+
|
18 |
+
col3.image("./sections/examples/men_happy.jpeg", use_column_width="auto", width=300)
|
19 |
+
col3.write("**Custom Question**: What color is the man's jacket?")
|
20 |
+
col3.write("**Predicted Answer**: black⚫")
|
21 |
+
|
22 |
+
col1.image("./sections/examples/car_color.jpeg", use_column_width="auto", width=300)
|
23 |
+
col1.write("**Actual Question**: What color is the car?")
|
24 |
+
col1.write("**Predicted Answer**: blue❎")
|
25 |
+
|
26 |
+
col2.image("./sections/examples/coat_color.jpeg", use_column_width="auto", width=300)
|
27 |
+
col2.write("**Actual Question**: What color is this person's coat?")
|
28 |
+
col2.write("**Predicted Answer**: blue✅")
|
29 |
+
|
30 |
+
toc.subheader("Counting Questions")
|
31 |
+
|
32 |
+
col1, col2, col3 = st.beta_columns([1,1, 1])
|
33 |
+
|
34 |
+
col1.image("./sections/examples/giraffe_zebra.jpeg", use_column_width="auto", width=300)
|
35 |
+
col1.write("**Actual Question**: How many zebras are there?")
|
36 |
+
col1.write("**Predicted Answer**: 0❎")
|
37 |
+
|
38 |
+
col2.image("./sections/examples/giraffe_zebra.jpeg", use_column_width="auto", width=300)
|
39 |
+
col2.write("**Custom Question**: How many giraffes are there?")
|
40 |
+
col2.write("**Predicted Answer**: 2❎")
|
41 |
+
|
42 |
+
col3.image("./sections/examples/teddy.jpeg", use_column_width="auto", width=300)
|
43 |
+
col3.write("**Custom Question**: How many teddy bears are present in the image?")
|
44 |
+
col3.write("**Predicted Answer**: 3✅")
|
45 |
+
|
46 |
+
col1.image("./sections/examples/candle_count.jpeg", use_column_width="auto", width=300)
|
47 |
+
col1.write("**Actual Question**: ¿Cuantas velas hay en el cupcake?")
|
48 |
+
col1.write("**English Translation**: How many candles are in the cupcake?")
|
49 |
+
col1.write("**Predicted Answer**: 0❎")
|
50 |
+
|
51 |
+
col1.image("./sections/examples/people_picture.jpeg", use_column_width="auto", width=300)
|
52 |
+
col1.write("**Actual Question**: ¿A cuánta gente le están tomando una foto?")
|
53 |
+
col1.write("**English Translation**: How many people are you taking a picture of?")
|
54 |
+
col1.write("**Predicted Answer**: 10❎")
|
55 |
+
|
56 |
+
toc.subheader("Size/Shape Questions")
|
57 |
+
col1, col2, col3 = st.beta_columns([1,1,1])
|
58 |
+
col1.image("./sections/examples/vase.jpeg", use_column_width="auto", width=300)
|
59 |
+
col1.write("**Actual Question**: What shape is the vase? ")
|
60 |
+
col1.write("**Predicted Answer**: round✅")
|
61 |
+
|
62 |
+
|
63 |
+
toc.subheader("Yes/No Questions")
|
64 |
+
col1, col2, col3 = st.beta_columns([1,1,1])
|
65 |
+
|
66 |
+
col1.image("./sections/examples/teddy.jpeg", use_column_width="auto", width=300)
|
67 |
+
col1.write("**Actual Question**: Sind das drei Teddybären?")
|
68 |
+
col1.write("**English Translation**: Are those teddy bears?")
|
69 |
+
col1.write("**Predicted Answer**: Ja (yes)✅")
|
70 |
+
|
71 |
+
col2.image("./sections/examples/winter.jpeg", use_column_width="auto", width=300)
|
72 |
+
col2.write("**Actual Question**: ¿Se lo tomaron en invierno?")
|
73 |
+
col2.write("**English Translation**: Did they take it in winter?")
|
74 |
+
col2.write("**Predicted Answer**: si (yes)✅")
|
75 |
+
|
76 |
+
col3.image("./sections/examples/clock.jpeg", use_column_width="auto", width=300)
|
77 |
+
col3.write("**Actual Question**: Is the clock ornate? ")
|
78 |
+
col3.write("**Predicted Answer**: yes✅")
|
79 |
+
|
80 |
+
col1.image("./sections/examples/decorated_building.jpeg", use_column_width="auto", width=300)
|
81 |
+
col1.write("**Actual Question**: Ist das Gebäude orniert?")
|
82 |
+
col1.write("**English Translation**: Is the building decorated?")
|
83 |
+
col1.write("**Predicted Answer**: Ja (yes)✅")
|
84 |
+
|
85 |
+
col2.image("./sections/examples/commuter_train.jpeg", use_column_width="auto", width=300)
|
86 |
+
col2.write("**Actual Question**: Ist das ein Pendler-Zug?")
|
87 |
+
col2.write("**English Translation**: Is that a commuter train?")
|
88 |
+
col2.write("**Predicted Answer**: Ja (yes)❎")
|
89 |
+
|
90 |
+
col3.image("./sections/examples/is_in_a_restaurant.jpeg", use_column_width="auto", width=300)
|
91 |
+
col3.write("**Actual Question**: Elle est dans un restaurant?")
|
92 |
+
col3.write("**English Translation**: Is she in a restaurant?")
|
93 |
+
col3.write("**Predicted Answer**: Oui (yes)❎")
|
94 |
+
|
95 |
+
col1.image("./sections/examples/giraffe_eyes.jpeg", use_column_width="auto", width=300)
|
96 |
+
col1.write("**Actual Question**: Est-ce que l'œil de la girafe est fermé?")
|
97 |
+
col1.write("**English Translation**: Are the giraffe's eyes closed?")
|
98 |
+
col1.write("**Predicted Answer**: Oui (yes)❎")
|
99 |
+
|
100 |
+
toc.subheader("Negatives Test")
|
101 |
+
col1, col2, col3 = st.beta_columns([1,1,1])
|
102 |
+
col1.image("./sections/examples/men_happy.jpeg", use_column_width="auto", width=300)
|
103 |
+
|
104 |
+
col2.write("**Actual Question**: Is the man happy?")
|
105 |
+
col2.write("**Predicted Answer**: Yes✅")
|
106 |
+
|
107 |
+
col3.write("**Actual Question**: Is the man not happy?")
|
108 |
+
col3.write("**Predicted Answer**: Yes❎")
|
109 |
+
|
110 |
+
col2.write("**Actual Question**: Is the man sad?")
|
111 |
+
col2.write("**Predicted Answer**: No✅")
|
112 |
+
|
113 |
+
col3.write("**Actual Question**: Is the man not sad?")
|
114 |
+
col3.write("**Predicted Answer**: No❎")
|
115 |
+
|
116 |
+
col2.write("**Actual Question**: Is the man unhappy?")
|
117 |
+
col2.write("**Predicted Answer**: No✅")
|
118 |
+
|
119 |
+
col3.write("**Actual Question**: Is the man not unhappy?")
|
120 |
+
col3.write("**Predicted Answer**: No❎")
|
121 |
+
|
122 |
+
toc.subheader("Multilinguality Test")
|
123 |
+
|
124 |
+
toc.subsubheader("Color Question")
|
125 |
+
col1, col2, col3 = st.beta_columns([1,1,1])
|
126 |
+
col1.image("./sections/examples/truck_color.jpeg", use_column_width="auto", width=300)
|
127 |
+
|
128 |
+
col2.write("**Actual Question**: What color is the building?")
|
129 |
+
col2.write("**Predicted Answer**: red✅")
|
130 |
+
|
131 |
+
col3.write("**Actual Question**: Welche Farbe hat das Gebäude?")
|
132 |
+
col3.write("**English Translation**: What color is the building?")
|
133 |
+
col3.write("**Predicted Answer**: rot (red)✅")
|
134 |
+
|
135 |
+
col2.write("**Actual Question**: ¿De qué color es el edificio?")
|
136 |
+
col2.write("**English Translation**: What color is the building?")
|
137 |
+
col2.write("**Predicted Answer**: rojo (red)✅")
|
138 |
+
|
139 |
+
col3.write("**Actual Question**: De quelle couleur est le bâtiment ?")
|
140 |
+
col3.write("**English Translation**: What color is the building?")
|
141 |
+
col3.write("**Predicted Answer**: rouge (red)✅")
|
142 |
+
|
143 |
+
toc.subsubheader("Counting Question")
|
144 |
+
col1, col2, col3 = st.beta_columns([1,1,1])
|
145 |
+
col1.image("./sections/examples/bear.jpeg", use_column_width="auto", width=300)
|
146 |
+
|
147 |
+
col2.write("**Actual Question**: How many bears do you see?")
|
148 |
+
col2.write("**Predicted Answer**: 1✅")
|
149 |
+
|
150 |
+
col3.write("**Actual Question**: Wie viele Bären siehst du?")
|
151 |
+
col3.write("**English Translation**: How many bears do you see?")
|
152 |
+
col3.write("**Predicted Answer**: 1✅")
|
153 |
+
|
154 |
+
col2.write("**Actual Question**: ¿Cuántos osos ves?")
|
155 |
+
col2.write("**English Translation**: How many bears do you see?")
|
156 |
+
col2.write("**Predicted Answer**: 1✅")
|
157 |
+
|
158 |
+
col3.write("**Actual Question**: Combien d'ours voyez-vous ?")
|
159 |
+
col3.write("**English Translation**: How many bears do you see?")
|
160 |
+
col3.write("**Predicted Answer**: 1✅")
|
161 |
+
|
162 |
+
toc.subsubheader("Misc Question")
|
163 |
+
col1, col2, col3 = st.beta_columns([1,1,1])
|
164 |
+
col1.image("./sections/examples/bench.jpeg", use_column_width="auto", width=300)
|
165 |
+
|
166 |
+
col2.write("**Actual Question**: Where is the bench?")
|
167 |
+
col2.write("**Predicted Answer**: field✅")
|
168 |
+
|
169 |
+
col3.write("**Actual Question**: Où est le banc ?")
|
170 |
+
col3.write("**English Translation**: Where is the bench?")
|
171 |
+
col3.write("**Predicted Answer**: domaine (field)✅")
|
172 |
+
|
173 |
+
col2.write("**Actual Question**: ¿Dónde está el banco?")
|
174 |
+
col2.write("**English Translation**: Where is the bench?")
|
175 |
+
col2.write("**Predicted Answer**: campo (field)✅")
|
176 |
+
|
177 |
+
col3.write("**Actual Question**: Wo ist die Bank?")
|
178 |
+
col3.write("**English Translation**: Where is the bench?")
|
179 |
+
col3.write("**Predicted Answer**: Feld (field)✅")
|
180 |
+
|
181 |
+
|
182 |
+
toc.subheader("Misc Questions")
|
183 |
+
col1, col2, col3 = st.beta_columns([1,1,1])
|
184 |
+
|
185 |
+
col1.image("./sections/examples/tennis.jpeg", use_column_width="auto", width=300)
|
186 |
+
col1.write("**Actual Question**: ¿Qué clase de juego está viendo la multitud?")
|
187 |
+
col1.write("**English Translation**: What kind of game is the crowd watching?")
|
188 |
+
col1.write("**Predicted Answer**: tenis (tennis)✅")
|
189 |
+
|
190 |
+
col2.image("./sections/examples/men_body_suits.jpeg", use_column_width="auto", width=300)
|
191 |
+
col2.write("**Custom Question**: What are the men wearing?")
|
192 |
+
col2.write("**Predicted Answer**: wetsuits✅")
|
193 |
+
|
194 |
+
col3.image("./sections/examples/bathroom.jpeg", use_column_width="auto", width=300)
|
195 |
+
col3.write("**Actual Question**: ¿A qué habitación perteneces?")
|
196 |
+
col3.write("**English Translation**: What room do you belong to?")
|
197 |
+
col3.write("**Predicted Answer**: bano (bathroom)✅")
|
198 |
+
|
199 |
+
col1.image("./sections/examples/men_riding_horses.jpeg", use_column_width="auto", width=300)
|
200 |
+
col1.write("**Custom Question**: What are the men riding?")
|
201 |
+
col1.write("**Predicted Answer**: horses✅")
|
202 |
+
|
203 |
+
col2.image("./sections/examples/inside_outside.jpeg", use_column_width="auto", width=300)
|
204 |
+
col2.write("**Actual Question**: Was this taken inside or outside?")
|
205 |
+
col2.write("**Predicted Answer**: inside✅")
|
206 |
+
|
207 |
+
col3.image("./sections/examples/dog_looking_at.jpeg", use_column_width="auto", width=300)
|
208 |
+
col3.write("**Actual Question**: Was guckt der Hund denn so?")
|
209 |
+
col3.write("**English Translation**: What is the dog looking at?")
|
210 |
+
col3.write("**Predicted Answer**: Frisbeescheibe (frisbee)❎")
|