File size: 2,413 Bytes
048d7df | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "0f28fdc7-ecfc-4319-ae46-df6c3da02aaf",
"metadata": {},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'huggingface_hub'",
"output_type": "error",
"traceback": [
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
"\u001b[31mModuleNotFoundError\u001b[39m Traceback (most recent call last)",
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[1]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mhuggingface_hub\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m HfApi\n\u001b[32m 3\u001b[39m \u001b[38;5;66;03m# 1. Setup\u001b[39;00m\n\u001b[32m 4\u001b[39m api = HfApi()\n",
"\u001b[31mModuleNotFoundError\u001b[39m: No module named 'huggingface_hub'"
]
}
],
"source": [
"from huggingface_hub import HfApi\n",
"\n",
"# 1. Setup\n",
"api = HfApi()\n",
"local_folder = \"./qwen3-telecom-injected\" # The folder in your screenshot\n",
"repo_id = \"vimalgupta/Qwen3-1.7B-Telecom-Injected_updated\" # Replace with your choice\n",
"\n",
"# 2. Create the repo (skip if already exists)\n",
"api.create_repo(repo_id=repo_id, repo_type=\"model\", exist_ok=True)\n",
"\n",
"# 3. Upload everything\n",
"print(f\"--- Pushing files to https://huggingface.co/{repo_id} ---\")\n",
"api.upload_folder(\n",
" folder_path=local_folder,\n",
" repo_id=repo_id,\n",
" repo_type=\"model\",\n",
")\n",
"\n",
"print(\"✅ Push complete!\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "74df8911-ce1a-4663-a9df-f1c0cde7ce02",
"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.12.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|