Created
September 25, 2018 22:48
-
-
Save tomas-wood/f822effc84291ecc855207be22bf84f9 to your computer and use it in GitHub Desktop.
get visual genome data
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
| def fetch_data(): | |
| urls = [ | |
| "https://visualgenome.org/static/data/dataset/objects.json.zip", | |
| "https://visualgenome.org/static/data/dataset/relationships.json.zip", | |
| "https://visualgenome.org/static/data/dataset/object_alias.txt", | |
| "https://visualgenome.org/static/data/dataset/relationship_alias.txt" | |
| ] | |
| if not os.path.exists('data'): | |
| os.mkdir('data') | |
| else: | |
| return | |
| os.chdir('data') | |
| for url in urls: | |
| wget.download(url) | |
| os.chdir('..') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment