Download search.py from nekofura/scripting: direct link, hf CLI and curl.
- Browser
- Download file 587 Bytes
-
https://huggingface.co/datasets/nekofura/scripting/resolve/main/search.py
- Command line
-
hf download hf://datasets/nekofura/scripting/search.py
-
curl -L -o search.py https://huggingface.co/datasets/nekofura/scripting/resolve/main/search.py
587 Bytes
| import os | |
| # Nama file yang ingin dicari | |
| target_file = "terratopia-clearvae-baked.safetensors" | |
| # Direktori folder input | |
| folder_path = "/kaggle/working" | |
| # Fungsi untuk mencari file | |
| def find_file(target_file, folder_path): | |
| for root, dirs, files in os.walk(folder_path): | |
| for file in files: | |
| if file == target_file: | |
| return os.path.join(root, file) | |
| # Mencari file dan menampilkan full path jika ditemukan | |
| file_path = find_file(target_file, folder_path) | |
| if file_path: | |
| print("File ditemukan di:", file_path) | |
| else: | |
| print("File tidak ditemukan.") | |