From 770b04de555ee21e70571c263297c63aada0be42 Mon Sep 17 00:00:00 2001 From: Soraya Arias <soraya.arias@grenoble-inp.fr> Date: Fri, 6 Mar 2020 14:52:05 +0100 Subject: [PATCH] Add path to word index json file --- IMDB/02-Prediction.ipynb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IMDB/02-Prediction.ipynb b/IMDB/02-Prediction.ipynb index f9474b9..4c9c3c2 100644 --- a/IMDB/02-Prediction.ipynb +++ b/IMDB/02-Prediction.ipynb @@ -138,7 +138,10 @@ "metadata": {}, "outputs": [], "source": [ - "with open('./data/word_index.json', 'r') as fp:\n", + "place, dataset_dir = ooo.good_place( { 'GRICAD' : f'{os.getenv(\"SCRATCH_DIR\",\"\")}/PROJECTS/pr-fidle/datasets/IMDB',\n", + " 'IDRIS' : f'{os.getenv(\"WORK\",\"\")}/datasets/IMDB',\n", + " 'HOME' : f'{os.getenv(\"HOME\",\"\")}/datasets/IMDB'} )\n", + "with open(dataset_dir+'/word_index.json', 'r') as fp:\n", " word_index = json.load(fp)\n", " index_word = {index:word for word,index in word_index.items()} " ] -- GitLab