def extract_descriptions(input_filename, index, texts):
 if texts:
  document = extract_description(texts)
  index.add(input_filename, document)
  sys.stdout.write('.')
  sys.stdout.flush()
 elif (texts == []):
  print ('%s had no discernible text.' % input_filename)
  index.set_contains_no_text(input_filename)

def extract_descriptions ( input_filename , index , texts ) : if texts : document = extract_description ( texts ) index . add ( input_filename , document ) sys . stdout . write ( '.' ) sys . stdout . flush ( ) elif ( texts == [ ] ) : print ( '%s had no discernible text.' % input_filename ) index . set_contains_no_text ( input_filename )
gets and indexes the text that was detected in the image .