Skip to content

Commit

Permalink
fixing google colab (#169)
Browse files Browse the repository at this point in the history
* removed some pre-installed conflicting packages in Google Colab.
  • Loading branch information
piterand authored Dec 13, 2023
1 parent d292152 commit 844ade7
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 5 deletions.
14 changes: 13 additions & 1 deletion ammico/notebooks/DemoNotebook_ammico.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
" # update python version\n",
" # install setuptools\n",
" # %pip install setuptools==61 -qqq\n",
" # uninstall some pre-installed packages due to incompatibility\n",
" %pip uninstall tensorflow-probability dopamine-rl lida pandas-gbq torchaudio torchdata torchtext orbax-checkpoint -y -qqq\n",
" # install ammico\n",
" %pip install git+https://github.com/ssciwr/ammico.git -qqq\n",
" # mount google drive for data and API key\n",
Expand Down Expand Up @@ -76,6 +78,7 @@
"source": [
"image_dict = ammico.find_files(\n",
" path=\"/content/drive/MyDrive/misinformation-data/\",\n",
" #path=\"../../data/\",\n",
" limit=2,\n",
")"
]
Expand Down Expand Up @@ -149,6 +152,15 @@
" summary_vis_processors=summary_vis_processors).analyse_image()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"image_dict"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -440,7 +452,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 2 additions & 0 deletions ammico/notebooks/colors_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
" # update python version\n",
" # install setuptools\n",
" # %pip install setuptools==61 -qqq\n",
" # uninstall some pre-installed packages due to incompatibility\n",
" %pip uninstall tensorflow-probability dopamine-rl lida pandas-gbq torchaudio torchdata torchtext orbax-checkpoint -y -qqq\n",
" # install ammico\n",
" %pip install git+https://github.com/ssciwr/ammico.git -qqq\n",
" # mount google drive for data and API key\n",
Expand Down
10 changes: 6 additions & 4 deletions ammico/notebooks/cropposts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@
"if 'google.colab' in str(get_ipython()):\n",
" # we're running on colab\n",
" # first install pinned version of setuptools (latest version doesn't seem to work with this package on colab)\n",
" %pip install setuptools==61 -qqq\n",
" # install the moralization package\n",
" #%pip install setuptools==61 -qqq\n",
" # uninstall some pre-installed packages due to incompatibility\n",
" %pip uninstall tensorflow-probability dopamine-rl lida pandas-gbq torchaudio torchdata torchtext orbax-checkpoint -y -qqq\n",
" # install the ammico package\n",
" %pip install git+https://github.com/ssciwr/AMMICO.git -qqq\n",
"\n",
" # prevent loading of the wrong opencv library\n",
" %pip uninstall -y opencv-contrib-python\n",
" %pip install opencv-contrib-python\n",
" #%pip uninstall -y opencv-contrib-python\n",
" #%pip install opencv-contrib-python\n",
"\n",
" from google.colab import drive\n",
" drive.mount('/content/drive')\n",
Expand Down
2 changes: 2 additions & 0 deletions ammico/notebooks/facial_expressions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
" # update python version\n",
" # install setuptools\n",
" # %pip install setuptools==61 -qqq\n",
" # uninstall some pre-installed packages due to incompatibility\n",
" %pip uninstall tensorflow-probability dopamine-rl lida pandas-gbq torchaudio torchdata torchtext orbax-checkpoint -y -qqq\n",
" # install ammico\n",
" %pip install git+https://github.com/ssciwr/ammico.git -qqq\n",
" # mount google drive for data and API key\n",
Expand Down
2 changes: 2 additions & 0 deletions ammico/notebooks/get-text-from-image.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
" # update python version\n",
" # install setuptools\n",
" # %pip install setuptools==61 -qqq\n",
" # uninstall some pre-installed packages due to incompatibility\n",
" %pip uninstall tensorflow-probability dopamine-rl lida pandas-gbq torchaudio torchdata torchtext orbax-checkpoint -y -qqq\n",
" # install ammico\n",
" %pip install git+https://github.com/ssciwr/ammico.git -qqq\n",
" # mount google drive for data and API key\n",
Expand Down
2 changes: 2 additions & 0 deletions ammico/notebooks/image_summary.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
" # update python version\n",
" # install setuptools\n",
" # %pip install setuptools==61 -qqq\n",
" # uninstall some pre-installed packages due to incompatibility\n",
" %pip uninstall tensorflow-probability dopamine-rl lida pandas-gbq torchaudio torchdata torchtext orbax-checkpoint -y -qqq\n",
" # install ammico\n",
" %pip install git+https://github.com/ssciwr/ammico.git -qqq\n",
" # mount google drive for data and API key\n",
Expand Down
2 changes: 2 additions & 0 deletions ammico/notebooks/multimodal_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
" # update python version\n",
" # install setuptools\n",
" # %pip install setuptools==61 -qqq\n",
" # uninstall some pre-installed packages due to incompatibility\n",
" %pip uninstall tensorflow-probability dopamine-rl lida pandas-gbq torchaudio torchdata torchtext orbax-checkpoint -y -qqq\n",
" # install ammico\n",
" %pip install git+https://github.com/ssciwr/ammico.git -qqq\n",
" # mount google drive for data and API key\n",
Expand Down

0 comments on commit 844ade7

Please sign in to comment.