File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
examples/image-classifier Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 7474 "colab" : {}
7575 },
7676 "source" : [
77+ " import time\n " ,
7778 " import tensorflow as tf\n " ,
7879 " import tensorflow_hub as hub\n " ,
7980 " from tensorflow.python.saved_model.signature_def_utils_impl import predict_signature_def\n " ,
8081 " \n " ,
81- " export_dir = \" export/1 \" \n" ,
82+ " export_dir = \" export/\" + str(time.time()).split('.')[0] \n " ,
8283 " builder = tf.saved_model.builder.SavedModelBuilder(export_dir)\n " ,
8384 " \n " ,
8485 " with tf.Session(graph=tf.Graph()) as sess:\n " ,
130131 "metadata" : {
131132 "id" : " 4xcDWxqCBPre" ,
132133 "colab_type" : " code" ,
133- "colab " : {} ,
134- "cellView " : " form "
134+ "cellView " : " form " ,
135+ "colab " : {}
135136 },
136137 "source" : [
137138 " AWS_ACCESS_KEY_ID = \"\" #@param {type:\" string\" }\n " ,
186187 " filekey = os.path.join(key, filepath[len(\" export/\" ):])\n " ,
187188 " print(\" Uploading s3://{}/{}...\" .format(bucket, filekey), end = '')\n " ,
188189 " s3.upload_file(filepath, bucket, filekey)\n " ,
189- " print(\" ✓\" )" ,
190+ " print(\" ✓\" )\n " ,
190191 " \n " ,
191192 " print(\"\\ nUploaded model export directory to \" + S3_UPLOAD_PATH)"
192193 ],
You can’t perform that action at this time.
0 commit comments