Created
May 13, 2020 12:15
-
-
Save gauravbansal98/a89ec1c105b718d422bdf993da6e825b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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