<jupyter_start><jupyter_text>Unsplash Image SearchThe project allows you to search images on Unsplash by using a natural words description. It is powered by OpenAI's [CLIP model](https://github.com/openai/CLIP).Use this notebook to setup your environment.  Install the DependenciesTo install the project's dependencies (including those for CLIP) run the following in the terminal. It is a good idea to create a virtual environment.```pip install -r requirements.txt```<jupyter_code>!which pip
!pip install -r requirements.txt<jupyter_output>Requirement already satisfied: backcall==0.2.0 in /home/guma/miniconda3/envs/clip/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (0.2.0)
Collecting decorator==4.4.2
  Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting ipykernel==5.4.3
  Using cached ipykernel-5.4.3-py3-none-any.whl (120 kB)
Collecting ipython==7.19.0
  Using cached ipython-7.19.0-py3-none-any.whl (784 kB)
Requirement already satisfied: ipython-genutils==0.2.0 in /home/guma/miniconda3/envs/clip/lib/python3.7/site-packages (from -r requirements.txt (line 5)) (0.2.0)
Collecting jedi==0.18.0
  Using cached jedi-0.18.0-py2.py3-none-any.whl (1.4 MB)
Collecting jupyter-client==6.1.11
  Using cached jupyter_client-6.1.11-py3-none-any.whl (108 kB)
Collecting jupyter-core==4.7.0
  Using cached jupyter_core-4.7.0-py3-none-any.whl (82 kB)
Collecting parso==0.8.1
  Using cached parso-0.8.1-py2.py3-none-any.whl (93 kB)
Requirement already satisfied: pexpect==4.8.0 in /home/guma/miniconda3/envs/cli[...]<jupyter_text>Clone the CLIP repository and copy the code<jupyter_code>!pip install git+https://github.com/openai/CLIP.git
# # Clone the CLIP repository
# !git clone https://github.com/openai/CLIP.git

# # Move the CLIP source files and the vocabulary in the root directory. 
# # Unfortunately, the CLIP code is not organized as a module, so it cannot be imported easily
# !mv CLIP/*.py .
# !mv CLIP/*.gz .

!ls<jupyter_output>01-setup-clip.ipynb		    CLIP       requirements.txt
02-download-unsplash-dataset.ipynb  colab      setup.py
03-process-unsplash-dataset.ipynb   images     unsplash-dataset
04-search-image-dataset.ipynb	    LICENSE    unsplash-proxy
09-search-image-api.ipynb	    README.md
{'fraction_non_alphanumeric': 0.12138728323699421, 'fraction_numerical': 0.048465984882169855, 'mean_word_length': 4.090497737556561, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '312356', 'license': 'MIT', 'n_tokens_mistral': 872, 'n_tokens_neox': 844, 'n_words': 206, 'path': '01-setup-clip.ipynb', 'repo_name': 'gu-ma/natural-language-image-search', 'size': '2249'}