Update hf_mirror.ipynb
Browse files- hf_mirror.ipynb +1 -1
hf_mirror.ipynb
CHANGED
|
@@ -21,7 +21,7 @@
|
|
| 21 |
" try:\n",
|
| 22 |
" with open(filepath, 'r', encoding='utf-8', errors='replace') as file:\n",
|
| 23 |
" content = file.read()\n",
|
| 24 |
-
" new_content = re.sub(r'
|
| 25 |
" with open(filepath, 'w', encoding='utf-8', errors='replace') as file:\n",
|
| 26 |
" file.write(new_content)\n",
|
| 27 |
" except Exception as e:\n",
|
|
|
|
| 21 |
" try:\n",
|
| 22 |
" with open(filepath, 'r', encoding='utf-8', errors='replace') as file:\n",
|
| 23 |
" content = file.read()\n",
|
| 24 |
+
" new_content = re.sub(r'huggingface.co', 'hf-mirror.com', content)\n",
|
| 25 |
" with open(filepath, 'w', encoding='utf-8', errors='replace') as file:\n",
|
| 26 |
" file.write(new_content)\n",
|
| 27 |
" except Exception as e:\n",
|