{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "lIYdn1woOS1n", "outputId": "9df704ad-c044-4172-9f2c-7e902fda9abf" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Collecting git+https://github.com/huggingface/huggingface_hub\n", " Cloning https://github.com/huggingface/huggingface_hub to /tmp/pip-req-build-epzdr933\n", " Running command git clone --filter=blob:none --quiet https://github.com/huggingface/huggingface_hub /tmp/pip-req-build-epzdr933\n", " Resolved https://github.com/huggingface/huggingface_hub to commit f7529325e0739a0c818f84d50b9642b30918407f\n", " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub==0.18.0.dev0) (3.12.4)\n", "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub==0.18.0.dev0) (2023.6.0)\n", "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub==0.18.0.dev0) (2.31.0)\n", "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub==0.18.0.dev0) (4.66.1)\n", "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub==0.18.0.dev0) (6.0.1)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub==0.18.0.dev0) (4.5.0)\n", "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub==0.18.0.dev0) (23.2)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub==0.18.0.dev0) (3.3.0)\n", "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub==0.18.0.dev0) (3.4)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub==0.18.0.dev0) (2.0.6)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub==0.18.0.dev0) (2023.7.22)\n", "Building wheels for collected packages: huggingface-hub\n", " Building wheel for huggingface-hub (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for huggingface-hub: filename=huggingface_hub-0.18.0.dev0-py3-none-any.whl size=300994 sha256=a318ecf0e26f2cb86afe747d4918d8028e1958d535d2ee34a92a1dd8b67016bb\n", " Stored in directory: /tmp/pip-ephem-wheel-cache-zzrfj0sm/wheels/81/77/10/4ea0848421de7e11b030d8127ca1139b1e0e254f714938175f\n", "Successfully built huggingface-hub\n", "Installing collected packages: huggingface-hub\n", "Successfully installed huggingface-hub-0.18.0.dev0\n" ] } ], "source": [ "%pip install git+https://github.com/huggingface/huggingface_hub" ] }, { "cell_type": "code", "source": [ "from huggingface_hub import list_models, model_info\n", "from tqdm.contrib.concurrent import thread_map\n", "from huggingface_hub.utils import GatedRepoError, RepositoryNotFoundError\n", "from huggingface_hub import login\n", "from huggingface_hub import HfApi" ], "metadata": { "id": "YSYeCyTg-8Ls" }, "execution_count": 2, "outputs": [] }, { "cell_type": "code", "source": [ "login()" ], "metadata": { "id": "O4Fd-N9GF51S", "outputId": "8524e8e7-f459-4470-c4fc-d432e22d9657", "colab": { "base_uri": "https://localhost:8080/", "height": 145, "referenced_widgets": [ "d5c2b4015d474ec28970e67606c675fd", "d549cc6f4fa34a9c986c6bd762980277", "e1f33fabe9004ca2a888b5e3bc7c71c5", "548e3786e8db4510a447e5ef03d82413", "8ce9ddd9ad804dc28be80767c93cd70a", "233853fa8373418aa5c37afe841b9b84", "21a0fce7266e42afab2e9577563608ca", "f75ffd1fb0c04754b676392b48aedbc4", "0042c3ef995541c59a9587e4d1454886", "659af07839f543eea1e654b547cf10a1", "c1e2474bc13c4cd1b30aa07bf329351e", "12d1b16212d74d60b30e268310369187", "745442b9956b41a58b33335f7789e45a", "80f17c7972b045518b1b5553fb6211b8", "8b4a2bdfe81b400ca3dd2468998f8500", "07d6ec54ac56461e81e564846fdc5580", "3ab0cd83c8b54f1ebede63c929fba069", "64f08b9f12a9451f9297d229f33b5932", "1fb42a24be614e1f9e70df431972411e", "f06c5c2e01064b9ca7150d9f21970e8d", "8a1031b8847e4f04939a678a0ba1c3c6", "056667c2104e4c85bd1684849b9e0e18", "50ad00e086874191a4d855c919a84a8f", "1d8354ece14746b09d1838cb9ffe6270", "75f7ec2440a34e12b7f0c276aa8fedd2", "202a0763aed8466aac13d916bbffe960", "db16bfdda84146c2baf02de6e48b78dc", "1c20c6ca97ab490bbf644133b81ea295", "6054bee15e5d406d86efa4f84aebd5a6", "ae11cceabec0452181319fd07c17a9e4", "18313b8c777042b2ad932395bc29dfa0", "4e31f722accb4fd790c29ed1729d925c" ] } }, "execution_count": 3, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "VBox(children=(HTML(value='