Skip to content

Instantly share code, notes, and snippets.

@gauravbansal98
Created May 13, 2020 12:15
Show Gist options
  • Select an option

  • Save gauravbansal98/a89ec1c105b718d422bdf993da6e825b to your computer and use it in GitHub Desktop.

Select an option

Save gauravbansal98/a89ec1c105b718d422bdf993da6e825b to your computer and use it in GitHub Desktop.
# load doc into memory
def load_doc(filename):
# open the file as read only
file = open(filename, 'r')
# read all text
text = file.read()
# close the file
file.close()
return text
filename = 'Flickr8k_text/Flickr8k.token.txt'
# load descriptions
doc = load_doc(filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment