Spaces:
Running
Running
Nguyễn Bá Thiêm commited on
Commit ·
68cd48b
1
Parent(s): 2235ef5
Remove unused code for retrieving parent directory name
Browse files- models/file.py +0 -11
models/file.py
DELETED
|
@@ -1,11 +0,0 @@
|
|
| 1 |
-
from pathlib import Path
|
| 2 |
-
|
| 3 |
-
path = '/kaggle/input/super-resolution-hust/Super Resolution HUST/Set5/image_SRF_4/'
|
| 4 |
-
|
| 5 |
-
# Parse the path using pathlib
|
| 6 |
-
p = Path(path)
|
| 7 |
-
|
| 8 |
-
# The 'Set5' part is the parent directory of 'image_SRF_4'
|
| 9 |
-
set5_part = p.parent.name
|
| 10 |
-
|
| 11 |
-
print(set5_part) # Output: Set5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|