Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -67,16 +67,15 @@ You will use the [MS-COCO dataset](http://cocodataset.org/#home) to train your m
|
|
67 |
|
68 |
**Caution: large download ahead**. You'll use the training set, which is a 13GB file.
|
69 |
"""
|
70 |
-
os.system("wget http://images.cocodataset.org/zips/train2014.zip")
|
71 |
# Download caption annotation files
|
72 |
annotation_folder = '/annotations/'
|
73 |
-
|
74 |
-
annotation_zip = tf.keras.utils.get_file('captions.zip',
|
75 |
cache_subdir=os.path.abspath('.'),
|
76 |
origin='http://images.cocodataset.org/annotations/annotations_trainval2014.zip',
|
77 |
extract=True)
|
78 |
-
|
79 |
-
|
80 |
|
81 |
# Download image files
|
82 |
image_folder = '/train2014/'
|
@@ -86,7 +85,7 @@ image_zip = tf.keras.utils.get_file('train2014.zip',
|
|
86 |
origin='http://images.cocodataset.org/zips/train2014.zip',
|
87 |
extract=True)
|
88 |
PATH = os.path.dirname(image_zip) + image_folder
|
89 |
-
os.remove(image_zip)
|
90 |
|
91 |
|
92 |
|
|
|
67 |
|
68 |
**Caution: large download ahead**. You'll use the training set, which is a 13GB file.
|
69 |
"""
|
70 |
+
# os.system("wget http://images.cocodataset.org/zips/train2014.zip")
|
71 |
# Download caption annotation files
|
72 |
annotation_folder = '/annotations/'
|
73 |
+
annotation_zip = tf.keras.utils.get_file('captions.zip',
|
|
|
74 |
cache_subdir=os.path.abspath('.'),
|
75 |
origin='http://images.cocodataset.org/annotations/annotations_trainval2014.zip',
|
76 |
extract=True)
|
77 |
+
annotation_file = os.path.dirname(annotation_zip)+'/annotations/captions_train2014.json'
|
78 |
+
# os.remove(annotation_zip)
|
79 |
|
80 |
# Download image files
|
81 |
image_folder = '/train2014/'
|
|
|
85 |
origin='http://images.cocodataset.org/zips/train2014.zip',
|
86 |
extract=True)
|
87 |
PATH = os.path.dirname(image_zip) + image_folder
|
88 |
+
# os.remove(image_zip)
|
89 |
|
90 |
|
91 |
|