From 5439eb49be6c0834e0484b8e4afe4f8a4dadf581 Mon Sep 17 00:00:00 2001 From: Phillip Lippe Date: Wed, 14 Feb 2024 08:08:02 -0400 Subject: [PATCH] Fixing GDrive download in demo --- demo.ipynb | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/demo.ipynb b/demo.ipynb index 5449a33..da9fd0a 100644 --- a/demo.ipynb +++ b/demo.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -9,7 +8,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -19,7 +17,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -49,7 +46,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -77,7 +73,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -94,7 +89,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -115,20 +109,19 @@ "# Download the model\n", "if not os.path.exists(CHECKPOINT_FILE):\n", " print(\"Downloading the model...\")\n", - " !wget --load-cookies /tmp/cookies.txt \"https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1GKFeEcoFFqLY3uMvrefS70THy6EcogqK' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\\1\\n/p')&id=1GKFeEcoFFqLY3uMvrefS70THy6EcogqK\" -O pretrained_models.tar.gz && rm -rf /tmp/cookies.txt\n", + " !gdown 1GKFeEcoFFqLY3uMvrefS70THy6EcogqK\n", " !tar -xzvf pretrained_models.tar.gz\n", " !rm pretrained_models.tar.gz\n", "\n", "# Download the data\n", "if not os.path.exists(DATA_FOLDER):\n", " print(\"Downloading the data...\")\n", - " !wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1PEqpxrHdx8-RoApAPeeu8OQqK3qmqKqH' -O demo_data.tar.gz\n", + " !gdown 1PEqpxrHdx8-RoApAPeeu8OQqK3qmqKqH\n", " !tar -xzvf demo_data.tar.gz\n", " !rm demo_data.tar.gz" ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -191,7 +184,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -199,7 +191,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -221,7 +212,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -257,7 +247,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -265,7 +254,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -308,7 +296,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -327,7 +314,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -346,7 +332,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -389,7 +374,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -408,7 +392,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -451,7 +434,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -507,7 +489,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -541,7 +522,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -549,7 +529,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -598,7 +577,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -636,7 +614,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -676,7 +653,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -684,7 +660,6 @@ ] }, { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -749,7 +724,7 @@ ], "metadata": { "kernelspec": { - "display_name": "causal", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -763,9 +738,8 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12 (default, Oct 12 2021, 13:49:34) \n[GCC 7.5.0]" + "version": "3.8.5" }, - "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "fa7e3afb224b4c936d9b4ea809be26926770ba5c2d1e177536460cba3b3336ad"