{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "c40cc4a1-9ea3-4d37-9393-4fe92777a2fc", "metadata": {}, "outputs": [], "source": [ "from huggingface_hub import HfApi\n", "\n", "api = HfApi(token=os.getenv(\"HF_TOKEN\"))\n", "api.upload_folder(\n", " folder_path=\"home/Ubuntu/apps/StableSwarmUI/Models/diffusion_models/Quality_1.safetensors\",\n", " repo_id=\"kratosboy507/three_tits\",\n", " repo_type=\"model\",\n", ")\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "690c4aea-3368-49ff-b2d2-86baf21a57e4", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", " _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_|\n", " _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n", " _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_|\n", " _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n", " _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_|\n", "\n", " To log in, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .\n", "Enter your token (input will not be visible): Traceback (most recent call last):\n", " File \"/usr/local/bin/huggingface-cli\", line 8, in \n", " sys.exit(main())\n", " File \"/usr/local/lib/python3.10/site-packages/huggingface_hub/commands/huggingface_cli.py\", line 57, in main\n", " service.run()\n", " File \"/usr/local/lib/python3.10/site-packages/huggingface_hub/commands/user.py\", line 153, in run\n", " login(\n", " File \"/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py\", line 101, in inner_f\n", " return f(*args, **kwargs)\n", " File \"/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py\", line 31, in inner_f\n", " return f(*args, **kwargs)\n", " File \"/usr/local/lib/python3.10/site-packages/huggingface_hub/_login.py\", line 130, in login\n", " interpreter_login(new_session=new_session)\n", " File \"/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py\", line 101, in inner_f\n", " return f(*args, **kwargs)\n", " File \"/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py\", line 31, in inner_f\n", " return f(*args, **kwargs)\n", " File \"/usr/local/lib/python3.10/site-packages/huggingface_hub/_login.py\", line 287, in interpreter_login\n", " token = getpass(\"Enter your token (input will not be visible): \")\n", " File \"/usr/local/lib/python3.10/getpass.py\", line 77, in unix_getpass\n", " passwd = _raw_input(prompt, stream, input=input)\n", " File \"/usr/local/lib/python3.10/getpass.py\", line 146, in _raw_input\n", " line = input.readline()\n", "KeyboardInterrupt\n" ] } ], "source": [ "!huggingface-cli login\n" ] }, { "cell_type": "code", "execution_count": null, "id": "94bc9b06-a361-472d-8d08-be7576f39cdf", "metadata": {}, "outputs": [], "source": [] } ], "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.15" } }, "nbformat": 4, "nbformat_minor": 5 }