Spaces:
Configuration error
Configuration error
File size: 2,584 Bytes
aff0286 |
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 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "f41437ec-ce1b-4acb-bc47-9c44eb5fdb4d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Looking in indexes: http://mirrors.aliyun.com/pypi/simple\n",
"Collecting huggingface\n",
" Downloading http://mirrors.aliyun.com/pypi/packages/f4/8c/e61fbc39c0a37140e1d4941c4af29e2d53bacf9f4559e3de24d8f4e484f0/huggingface-0.0.1-py3-none-any.whl (2.5 kB)\n",
"Installing collected packages: huggingface\n",
"Successfully installed huggingface-0.0.1\n",
"\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",
"\u001b[0mNote: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"pip install huggingface"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "bd8448cc-31a3-4f70-bf0f-4d0fdd817c20",
"metadata": {},
"outputs": [],
"source": [
"\n",
"import subprocess\n",
"import os\n",
"\n",
"result = subprocess.run('bash -c \"source /etc/network_turbo && env | grep proxy\"', shell=True, capture_output=True, text=True)\n",
"output = result.stdout\n",
"for line in output.splitlines():\n",
" if '=' in line:\n",
" var, value = line.split('=', 1)\n",
" os.environ[var] = value"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7636af72-782b-4aaf-9f86-8412aa965405",
"metadata": {},
"outputs": [],
"source": [
"from huggingface_hub import HfApi\n",
"api = HfApi()\n",
"\n",
"api.upload_folder(\n",
" folder_path=\"\",\n",
" repo_id=\"kevinwang676/MuseTalk\",\n",
" repo_type=\"space\",\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fe75559a-a4ae-435b-87f8-c7e25b0b6852",
"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.10.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|