{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "!mkdir alxlnet-base-2020-04-09"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "!cp output-model/config.json alxlnet-base-2020-04-09"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "!cp output-model/model.ckpt-240000* alxlnet-base-2020-04-09"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "alxlnet-base-2020-04-09/\n",
      "alxlnet-base-2020-04-09/model.ckpt-240000.index\n",
      "alxlnet-base-2020-04-09/model.ckpt-240000.data-00000-of-00001\n",
      "alxlnet-base-2020-04-09/config.json\n",
      "alxlnet-base-2020-04-09/model.ckpt-240000.meta\n"
     ]
    }
   ],
   "source": [
    "!tar cvzf alxlnet-base-2020-04-09.tar.gz alxlnet-base-2020-04-09"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "import boto3\n",
    "\n",
    "bucketName = 'huseinhouse-storage'\n",
    "Key = 'alxlnet-base-2020-04-09.tar.gz'\n",
    "outPutname = \"bert-bahasa/alxlnet-base-2020-04-09.tar.gz\"\n",
    "\n",
    "s3 = boto3.client('s3')\n",
    "s3.upload_file(Key,bucketName,outPutname)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
