{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Push the model to huggingface" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Using Device: cuda:1 | Name: NVIDIA RTX A6000\n" ] }, { "data": { "text/plain": [ "" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from huggingface_hub import HfApi\n", "from huggingface_hub import login\n", "\n", "login(token=\"\")\n", "\n", "api = HfApi()\n", "\n", "# Upload model files\n", "api.upload_folder(\n", " folder_path=\"./models\",\n", " repo_id=\"eshangj/SimpleTransformer\", # replace with repo name\n", " repo_type=\"model\"\n", ")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.12.4" } }, "nbformat": 4, "nbformat_minor": 2 }