kevinwang676 commited on
Commit
f478a8a
·
verified ·
1 Parent(s): 40b44b5

Delete Untitled.ipynb

Browse files
Files changed (1) hide show
  1. Untitled.ipynb +0 -196
Untitled.ipynb DELETED
@@ -1,196 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 1,
6
- "id": "db0fb324-5d25-4b3d-8fec-d1a44133c46b",
7
- "metadata": {},
8
- "outputs": [
9
- {
10
- "name": "stdout",
11
- "output_type": "stream",
12
- "text": [
13
- "Requirement already satisfied: huggingface_hub in /opt/conda/lib/python3.10/site-packages (0.28.1)\n",
14
- "Requirement already satisfied: filelock in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (3.13.1)\n",
15
- "Requirement already satisfied: fsspec>=2023.5.0 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (2024.2.0)\n",
16
- "Requirement already satisfied: packaging>=20.9 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (23.1)\n",
17
- "Requirement already satisfied: pyyaml>=5.1 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (6.0.1)\n",
18
- "Requirement already satisfied: requests in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (2.31.0)\n",
19
- "Requirement already satisfied: tqdm>=4.42.1 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (4.65.0)\n",
20
- "Requirement already satisfied: typing-extensions>=3.7.4.3 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (4.12.2)\n",
21
- "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (2.0.4)\n",
22
- "Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (3.4)\n",
23
- "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (2.1.0)\n",
24
- "Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (2024.2.2)\n",
25
- "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
26
- "\u001b[0mNote: you may need to restart the kernel to use updated packages.\n"
27
- ]
28
- }
29
- ],
30
- "source": [
31
- "pip install huggingface_hub"
32
- ]
33
- },
34
- {
35
- "cell_type": "code",
36
- "execution_count": 2,
37
- "id": "ccb7bd91-c4be-4493-99cc-e5e44816627b",
38
- "metadata": {},
39
- "outputs": [
40
- {
41
- "data": {
42
- "application/vnd.jupyter.widget-view+json": {
43
- "model_id": "0721ad5149e9468b83e667feb6658365",
44
- "version_major": 2,
45
- "version_minor": 0
46
- },
47
- "text/plain": [
48
- "VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
49
- ]
50
- },
51
- "metadata": {},
52
- "output_type": "display_data"
53
- }
54
- ],
55
- "source": [
56
- "from huggingface_hub import login\n",
57
- "login()"
58
- ]
59
- },
60
- {
61
- "cell_type": "code",
62
- "execution_count": 5,
63
- "id": "6d975db0-1bec-4bdf-84b2-0a5f6dbe8c44",
64
- "metadata": {},
65
- "outputs": [
66
- {
67
- "name": "stdout",
68
- "output_type": "stream",
69
- "text": [
70
- "/workspace/CosyVoice\n"
71
- ]
72
- },
73
- {
74
- "name": "stderr",
75
- "output_type": "stream",
76
- "text": [
77
- "/opt/conda/lib/python3.10/site-packages/IPython/core/magics/osm.py:417: UserWarning: using dhist requires you to install the `pickleshare` library.\n",
78
- " self.shell.db['dhist'] = compress_dhist(dhist)[-100:]\n"
79
- ]
80
- }
81
- ],
82
- "source": [
83
- "%cd .."
84
- ]
85
- },
86
- {
87
- "cell_type": "code",
88
- "execution_count": null,
89
- "id": "0ad4e1d0-b5f9-4b5a-a5f4-b162554008dc",
90
- "metadata": {},
91
- "outputs": [],
92
- "source": []
93
- },
94
- {
95
- "cell_type": "code",
96
- "execution_count": 6,
97
- "id": "4824c41d-4b54-4fed-bf30-526f0aac4619",
98
- "metadata": {},
99
- "outputs": [
100
- {
101
- "name": "stderr",
102
- "output_type": "stream",
103
- "text": [
104
- "/opt/conda/lib/python3.10/site-packages/huggingface_hub/hf_api.py:9216: UserWarning: Warnings while validating metadata in README.md:\n",
105
- "- empty or missing yaml metadata in repo card\n",
106
- " warnings.warn(f\"Warnings while validating metadata in README.md:\\n{message}\")\n",
107
- "It seems you are trying to upload a large folder at once. This might take some time and then fail if the folder is too large. For such cases, it is recommended to upload in smaller batches or to use `HfApi().upload_large_folder(...)`/`huggingface-cli upload-large-folder` instead. For more details, check out https://huggingface.co/docs/huggingface_hub/main/en/guides/upload#upload-a-large-folder.\n"
108
- ]
109
- },
110
- {
111
- "data": {
112
- "text/plain": [
113
- "CommitInfo(commit_url='https://huggingface.co/kevinwang676/CosyVoice2/commit/b7d3b46ed7ed6d34f7e595fca3e4ed23d3db3f3d', commit_message='Upload folder using huggingface_hub', commit_description='', oid='b7d3b46ed7ed6d34f7e595fca3e4ed23d3db3f3d', pr_url=None, repo_url=RepoUrl('https://huggingface.co/kevinwang676/CosyVoice2', endpoint='https://huggingface.co', repo_type='model', repo_id='kevinwang676/CosyVoice2'), pr_revision=None, pr_num=None)"
114
- ]
115
- },
116
- "execution_count": 6,
117
- "metadata": {},
118
- "output_type": "execute_result"
119
- }
120
- ],
121
- "source": [
122
- "from huggingface_hub import HfApi\n",
123
- "api = HfApi()\n",
124
- "\n",
125
- "api.upload_folder(\n",
126
- " folder_path=\"\",\n",
127
- " repo_id=\"kevinwang676/CosyVoice2\",\n",
128
- " repo_type=\"model\",\n",
129
- ")"
130
- ]
131
- },
132
- {
133
- "cell_type": "code",
134
- "execution_count": 7,
135
- "id": "be43697d-6064-4097-b3c4-3466a03ba19b",
136
- "metadata": {},
137
- "outputs": [
138
- {
139
- "data": {
140
- "text/plain": [
141
- "CommitInfo(commit_url='https://huggingface.co/kevinwang676/CosyVoice2/commit/ecad1371e4e3b3a477f5cce458e415f4674ab8d3', commit_message='Upload folder using huggingface_hub', commit_description='', oid='ecad1371e4e3b3a477f5cce458e415f4674ab8d3', pr_url=None, repo_url=RepoUrl('https://huggingface.co/kevinwang676/CosyVoice2', endpoint='https://huggingface.co', repo_type='model', repo_id='kevinwang676/CosyVoice2'), pr_revision=None, pr_num=None)"
142
- ]
143
- },
144
- "execution_count": 7,
145
- "metadata": {},
146
- "output_type": "execute_result"
147
- }
148
- ],
149
- "source": [
150
- "from huggingface_hub import HfApi\n",
151
- "api = HfApi()\n",
152
- "\n",
153
- "api.upload_folder(\n",
154
- " folder_path=\"cosyvoice\",\n",
155
- " repo_id=\"kevinwang676/CosyVoice2\",\n",
156
- " repo_type=\"model\",\n",
157
- ")"
158
- ]
159
- },
160
- {
161
- "cell_type": "code",
162
- "execution_count": null,
163
- "id": "4476e9ee-c00b-43fc-b2d0-dd4a0f6c76ed",
164
- "metadata": {},
165
- "outputs": [],
166
- "source": [
167
- "api.upload_large_folder(\n",
168
- " repo_id=\"kevinwang676/CosyVoice2\",\n",
169
- " repo_type=\"dataset\",\n",
170
- " folder_path=\"/path/to/local/docmatix\",\n",
171
- ")"
172
- ]
173
- }
174
- ],
175
- "metadata": {
176
- "kernelspec": {
177
- "display_name": "Python 3 (ipykernel)",
178
- "language": "python",
179
- "name": "python3"
180
- },
181
- "language_info": {
182
- "codemirror_mode": {
183
- "name": "ipython",
184
- "version": 3
185
- },
186
- "file_extension": ".py",
187
- "mimetype": "text/x-python",
188
- "name": "python",
189
- "nbconvert_exporter": "python",
190
- "pygments_lexer": "ipython3",
191
- "version": "3.10.13"
192
- }
193
- },
194
- "nbformat": 4,
195
- "nbformat_minor": 5
196
- }