feat: download dataset from Google Drive when running locally
- Add dep to requirements.txt - Non-Colab path: download dataset_jagung.zip from Drive using file ID if not present locally, then extract as usual - Keeps Colab path unchanged (drive.mount) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
ddced09bbc
commit
b83b2e132f
2 files changed
+2
-1
No files matched your search
@@ -170,7 +170,7 @@
|
||||
"outputId": "30228ce8-1b64-47f5-93f7-30632b2af1c5"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": "if IS_COLAB:\n drive.mount('/content/drive')\n archive_path = '/content/drive/MyDrive/jagung/dataset_jagung.zip'\n destination_path = '/content/dataset_jagung.zip'\n extract_path = '/content/dataset'\nelse:\n # Local: dataset assumed at Machine_Learning/dataset_jagung.zip\n base = os.getcwd()\n archive_path = os.path.join(base, 'dataset_jagung.zip')\n destination_path = archive_path # no copy needed\n extract_path = os.path.join(base, 'dataset')\n\nif oLine truncated
|
||||
"source": "if IS_COLAB:\n drive.mount('/content/drive')\n archive_path = '/content/drive/MyDrive/jagung/dataset_jagung.zip'\n destination_path = '/content/dataset_jagung.zip'\n extract_path = '/content/dataset'\nelse:\n import gdown\n base = os.getcwd()\n archive_path = os.path.join(base, 'dataset_jagung.zip')\n destination_path = archive_path\n extract_path = os.path.join(base, 'dataset')\n # If dataset doesn't exist locally, download from Google Drive\n DRILine truncated
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
tensorflow==2.19.0 # CPU + Colab; for local GPU, install tensorflow[and-cuda]
|
||||
tensorflowjs==4.22.0
|
||||
gdown # download dataset from Google Drive
|
||||
numpy
|
||||
matplotlib
|
||||
seaborn
|
||||
|
||||
Reference in new issue
Block a user