king007 commited on
Commit
78c63b9
1 Parent(s): 23a9f1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -182,11 +182,14 @@ def process_question(question, document, model=list(CHECKPOINTS.keys())[0]):
182
 
183
 
184
  def load_example_document(img, question, model):
 
 
185
  if img is not None:
186
  if question in question_files:
187
  document = load_document(question_files[question])
188
  else:
189
  document = ImageDocument(Image.fromarray(img), get_ocr_reader())
 
190
  preview, answer, answer_text = process_question(question, document, model)
191
  return document, question, preview, gr.update(visible=True), answer, answer_text
192
  else:
 
182
 
183
 
184
  def load_example_document(img, question, model):
185
+ print(question)
186
+ print(img)
187
  if img is not None:
188
  if question in question_files:
189
  document = load_document(question_files[question])
190
  else:
191
  document = ImageDocument(Image.fromarray(img), get_ocr_reader())
192
+ print(document)
193
  preview, answer, answer_text = process_question(question, document, model)
194
  return document, question, preview, gr.update(visible=True), answer, answer_text
195
  else: