{ "cells": [ { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "68716bf0c6534512aa0e010ae73e1546", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HTML(value='
1\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mhuggingface_hub\u001b[39;00m \u001b[39mimport\u001b[39;00m upload_file, delete_file\n\u001b[1;32m 2\u001b[0m \u001b[39m# LOCAL_FILE_PATH = '/Users/juniverse/Downloads/CLIP_LoRA_CSE_15.pt'\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[39m# 파일을 직접 업로드\u001b[39;00m\n\u001b[0;32m----> 4\u001b[0m upload_file(\n\u001b[1;32m 5\u001b[0m \u001b[39m'\u001b[39;49m\u001b[39m/Users/juniverse/Downloads/CLIP_LoRA_CSE_15.pt\u001b[39;49m\u001b[39m'\u001b[39;49m,\n\u001b[1;32m 6\u001b[0m path_in_repo\u001b[39m=\u001b[39;49m\u001b[39m'\u001b[39;49m\u001b[39m./model\u001b[39;49m\u001b[39m'\u001b[39;49m,\n\u001b[1;32m 7\u001b[0m repo_id\u001b[39m=\u001b[39;49m\u001b[39m'\u001b[39;49m\u001b[39mSoran/CLIP_LoRA_SimCSE\u001b[39;49m\u001b[39m'\u001b[39;49m,\n\u001b[1;32m 8\u001b[0m )\n", "File \u001b[0;32m~/opt/anaconda3/envs/veda/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py:118\u001b[0m, in \u001b[0;36mvalidate_hf_hub_args.._inner_fn\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 115\u001b[0m \u001b[39mif\u001b[39;00m check_use_auth_token:\n\u001b[1;32m 116\u001b[0m kwargs \u001b[39m=\u001b[39m smoothly_deprecate_use_auth_token(fn_name\u001b[39m=\u001b[39mfn\u001b[39m.\u001b[39m\u001b[39m__name__\u001b[39m, has_token\u001b[39m=\u001b[39mhas_token, kwargs\u001b[39m=\u001b[39mkwargs)\n\u001b[0;32m--> 118\u001b[0m \u001b[39mreturn\u001b[39;00m fn(\u001b[39m*\u001b[39;49margs, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwargs)\n", "File \u001b[0;32m~/opt/anaconda3/envs/veda/lib/python3.8/site-packages/huggingface_hub/hf_api.py:849\u001b[0m, in \u001b[0;36mfuture_compatible.._inner\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 846\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mrun_as_future(fn, \u001b[39mself\u001b[39m, \u001b[39m*\u001b[39margs, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs)\n\u001b[1;32m 848\u001b[0m \u001b[39m# Otherwise, call the function normally\u001b[39;00m\n\u001b[0;32m--> 849\u001b[0m \u001b[39mreturn\u001b[39;00m fn(\u001b[39mself\u001b[39;49m, \u001b[39m*\u001b[39;49margs, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwargs)\n", "\u001b[0;31mTypeError\u001b[0m: upload_file() takes 1 positional argument but 2 positional arguments (and 2 keyword-only arguments) were given" ] } ], "source": [ "from huggingface_hub import upload_file, delete_file\n", "# LOCAL_FILE_PATH = '/Users/juniverse/Downloads/CLIP_LoRA_CSE_15.pt'\n", "# 파일을 직접 업로드\n", "upload_file(\n", " '/Users/juniverse/Downloads/CLIP_LoRA_CSE_15.pt',\n", " path_in_repo='./model',\n", " repo_id='Soran/CLIP_LoRA_SimCSE',\n", ")" ] } ], "metadata": { "kernelspec": { "display_name": "veda", "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.8.17" } }, "nbformat": 4, "nbformat_minor": 2 }