Ariel Fikru commited on
Commit
022a18d
·
1 Parent(s): b69af02

Create search.py

Browse files
Files changed (1) hide show
  1. search.py +20 -0
search.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ # Nama file yang ingin dicari
4
+ target_file = "terratopia-clearvae-baked.safetensors"
5
+ # Direktori folder input
6
+ folder_path = "/kaggle/working"
7
+
8
+ # Fungsi untuk mencari file
9
+ def find_file(target_file, folder_path):
10
+ for root, dirs, files in os.walk(folder_path):
11
+ for file in files:
12
+ if file == target_file:
13
+ return os.path.join(root, file)
14
+
15
+ # Mencari file dan menampilkan full path jika ditemukan
16
+ file_path = find_file(target_file, folder_path)
17
+ if file_path:
18
+ print("File ditemukan di:", file_path)
19
+ else:
20
+ print("File tidak ditemukan.")