Spaces:
Sleeping
Sleeping
File size: 4,399 Bytes
e1dfa10 |
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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"id": "74ee58a0-8c1a-4650-bb45-367214130cde",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Run this to confirm the notebook is working.\n"
]
}
],
"source": [
"print(\"Run this to confirm the notebook is working.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0889a582-4903-496f-99e7-7cdcdffe9f29",
"metadata": {},
"outputs": [],
"source": [
"# Please make sure you are logged in with `huggingface-cli login`"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "40b30b76-185c-4404-b5ed-157a7c745ce1",
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting huggingface_hub\n",
" Downloading huggingface_hub-0.23.0-py3-none-any.whl (401 kB)\n",
"\u001b[K |ββββββββββββββββββββββββββββββββ| 401 kB 25.6 MB/s eta 0:00:01\n",
"\u001b[?25hRequirement already satisfied: pyyaml>=5.1 in /home/user/miniconda/lib/python3.9/site-packages (from huggingface_hub) (6.0.1)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /home/user/miniconda/lib/python3.9/site-packages (from huggingface_hub) (4.11.0)\n",
"Collecting filelock\n",
" Downloading filelock-3.14.0-py3-none-any.whl (12 kB)\n",
"Requirement already satisfied: tqdm>=4.42.1 in /home/user/miniconda/lib/python3.9/site-packages (from huggingface_hub) (4.61.2)\n",
"Requirement already satisfied: requests in /home/user/miniconda/lib/python3.9/site-packages (from huggingface_hub) (2.31.0)\n",
"Collecting fsspec>=2023.5.0\n",
" Downloading fsspec-2024.5.0-py3-none-any.whl (316 kB)\n",
"\u001b[K |ββββββββββββββββββββββββββββββββ| 316 kB 143.8 MB/s eta 0:00:01\n",
"\u001b[?25hRequirement already satisfied: packaging>=20.9 in /home/user/miniconda/lib/python3.9/site-packages (from huggingface_hub) (24.0)\n",
"Requirement already satisfied: idna<4,>=2.5 in /home/user/miniconda/lib/python3.9/site-packages (from requests->huggingface_hub) (2.10)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /home/user/miniconda/lib/python3.9/site-packages (from requests->huggingface_hub) (3.3.2)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in /home/user/miniconda/lib/python3.9/site-packages (from requests->huggingface_hub) (1.26.6)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /home/user/miniconda/lib/python3.9/site-packages (from requests->huggingface_hub) (2021.5.30)\n",
"Installing collected packages: fsspec, filelock, huggingface-hub\n",
"Successfully installed filelock-3.14.0 fsspec-2024.5.0 huggingface-hub-0.23.0\n"
]
}
],
"source": [
"!pip install huggingface_hub"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "03ad7b5e-24ae-49e5-8fa7-e6b30260012f",
"metadata": {},
"outputs": [],
"source": [
"from huggingface_hub import HfApi\n",
"\n",
"api = HfApi()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f19b7b94-54d9-4c57-ad16-544b694d6d17",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"uploaded_file_info = api.upload_file(\n",
" path_or_fileobj=\"check.ipynb\",\n",
" path_in_repo=\"data1/check.ipynb\",\n",
" repo_id=\"FlawedLLM/Jupyter_Amex\",\n",
" repo_type=\"space\",\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a7f4ee16-819d-4c43-a904-ed94b5d58a2f",
"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.9.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|