{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "7a4f9213-ac23-4f92-af20-74db0bd4f74a", "metadata": {}, "outputs": [ { "ename": "ModuleNotFoundError", "evalue": "No module named 'huggingface_hub'", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", "Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mhuggingface_hub\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m HfApi, logging\n\u001b[1;32m 3\u001b[0m logging\u001b[38;5;241m.\u001b[39mset_verbosity_debug()\n\u001b[1;32m 4\u001b[0m hf \u001b[38;5;241m=\u001b[39m HfApi()\n", "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'huggingface_hub'" ] } ], "source": [ "from huggingface_hub import HfApi, logging\n", "\n", "logging.set_verbosity_debug()\n", "hf = HfApi()\n", "hf.upload_file(path_or_fileobj=\".\", path_in_repo=\".\", repo_id=\"mrtuandao/pokemon-finetune\", repo_type=\"model\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 5 }