Ankur Goyal commited on
Commit
a83fad4
1 Parent(s): b403624

Fix example reloading issue

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -166,7 +166,7 @@ def load_example_document(img, question, model):
166
  preview, answer, answer_text = process_question(question, document, model)
167
  return document, question, preview, gr.update(visible=True), answer, answer_text
168
  else:
169
- return None, None, None, gr.update(visible=False), None
170
 
171
 
172
  CSS = """
@@ -352,9 +352,9 @@ with gr.Blocks(css=CSS) as demo:
352
  lambda _: (
353
  gr.update(visible=False, value=None),
354
  None,
355
- None,
356
  gr.update(visible=False, value=None),
357
  gr.update(visible=False, value=None),
 
358
  None,
359
  None,
360
  None,
@@ -364,9 +364,9 @@ with gr.Blocks(css=CSS) as demo:
364
  outputs=[
365
  image,
366
  document,
367
- question,
368
  output,
369
  output_text,
 
370
  example_image,
371
  upload,
372
  url,
 
166
  preview, answer, answer_text = process_question(question, document, model)
167
  return document, question, preview, gr.update(visible=True), answer, answer_text
168
  else:
169
+ return None, None, None, gr.update(visible=False), None, None
170
 
171
 
172
  CSS = """
 
352
  lambda _: (
353
  gr.update(visible=False, value=None),
354
  None,
 
355
  gr.update(visible=False, value=None),
356
  gr.update(visible=False, value=None),
357
+ gr.update(visible=False),
358
  None,
359
  None,
360
  None,
 
364
  outputs=[
365
  image,
366
  document,
 
367
  output,
368
  output_text,
369
+ img_clear_button,
370
  example_image,
371
  upload,
372
  url,