def get_text_from_files(vision, index, input_filenames):
 texts = vision.detect_text(input_filenames)
 for (filename, text) in texts.items():
  extract_descriptions(filename, index, text)

def get_text_from_files ( vision , index , input_filenames ) : texts = vision . detect_text ( input_filenames ) for ( filename , text ) in texts . items ( ) : extract_descriptions ( filename , index , text )
call the vision api on a file and index the results .