enemy7 commited on
Commit
92ccf45
1 Parent(s): fa4df14

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -7
main.py CHANGED
@@ -67,7 +67,7 @@ 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
-
71
  # Download caption annotation files
72
  annotation_folder = '/annotations/'
73
  if not os.path.exists(os.path.abspath('.') + annotation_folder):
@@ -80,15 +80,14 @@ if not os.path.exists(os.path.abspath('.') + annotation_folder):
80
 
81
  # Download image files
82
  image_folder = '/train2014/'
83
- if not os.path.exists(os.path.abspath('.') + image_folder):
84
- image_zip = tf.keras.utils.get_file('train2014.zip',
85
  cache_subdir=os.path.abspath('.'),
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
- else:
91
- PATH = os.path.abspath('.') + image_folder
92
 
93
 
94
  """## Optional: limit the size of the training set
 
67
 
68
  **Caution: large download ahead**. You'll use the training set, which is a 13GB file.
69
  """
70
+ wget "http://images.cocodataset.org/zips/train2014.zip"
71
  # Download caption annotation files
72
  annotation_folder = '/annotations/'
73
  if not os.path.exists(os.path.abspath('.') + annotation_folder):
 
80
 
81
  # Download image files
82
  image_folder = '/train2014/'
83
+
84
+ image_zip = tf.keras.utils.get_file('train2014.zip',
85
  cache_subdir=os.path.abspath('.'),
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
 
93
  """## Optional: limit the size of the training set