Spaces:
Sleeping
Sleeping
Commit
·
0ec1892
1
Parent(s):
c6d14c2
Update app.py
Browse files
app.py
CHANGED
@@ -188,6 +188,9 @@ def show_random_sample(username_label, remaining_batch):
|
|
188 |
|
189 |
def write_user_description(username_label, image_id, user_description, skip_or_submit):
|
190 |
if skip_or_submit == SKIP_MESSAGE:
|
|
|
|
|
|
|
191 |
provided_description = "N/A"
|
192 |
else:
|
193 |
provided_description = user_description
|
@@ -251,4 +254,14 @@ with gr.Blocks() as demo:
|
|
251 |
outputs=[glitch_image, glitch_image_id, user_description],
|
252 |
)
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
demo.launch()
|
|
|
188 |
|
189 |
def write_user_description(username_label, image_id, user_description, skip_or_submit):
|
190 |
if skip_or_submit == SKIP_MESSAGE:
|
191 |
+
return
|
192 |
+
|
193 |
+
if skip_or_submit == IDUNNU_MESSAGE:
|
194 |
provided_description = "N/A"
|
195 |
else:
|
196 |
provided_description = user_description
|
|
|
254 |
outputs=[glitch_image, glitch_image_id, user_description],
|
255 |
)
|
256 |
|
257 |
+
skip_btn.click(
|
258 |
+
write_user_description,
|
259 |
+
inputs=[username_label, glitch_image_id, user_description, skip_btn],
|
260 |
+
outputs=[],
|
261 |
+
).then(
|
262 |
+
show_random_sample,
|
263 |
+
inputs=[username_label, remaining_batch],
|
264 |
+
outputs=[glitch_image, glitch_image_id, user_description],
|
265 |
+
)
|
266 |
+
|
267 |
demo.launch()
|