Spaces:
No application file
No application file
Download webui/modules/implementations/huggingface_hub_monkeypatching.py from mrtroydev/audio-webui: direct link, hf CLI and curl.
- Browser
- Download file 387 Bytes
-
https://huggingface.co/spaces/mrtroydev/audio-webui/resolve/refs%2Fpr%2F2/webui/modules/implementations/huggingface_hub_monkeypatching.py
- Command line
-
hf download hf://spaces/mrtroydev/audio-webui@refs/pr/2/webui/modules/implementations/huggingface_hub_monkeypatching.py
-
curl -L -o huggingface_hub_monkeypatching.py https://huggingface.co/spaces/mrtroydev/audio-webui/resolve/refs%2Fpr%2F2/webui/modules/implementations/huggingface_hub_monkeypatching.py
387 Bytes
| import huggingface_hub.file_download as fd | |
| original_check_disk_space = fd._check_disk_space | |
| def _check_disk_space(expected_size, target_dir): | |
| """Calls the original, but with a try-catch to fix some crashes""" | |
| try: | |
| original_check_disk_space(expected_size, target_dir) | |
| except Exception as _: | |
| pass | |
| def patch(): | |
| fd._check_disk_space = _check_disk_space | |