Spaces:
Running
Running
Nguyễn Bá Thiêm
commited on
Commit
·
772e02a
1
Parent(s):
d3be56c
Add code to parse and print parent directory name
Browse files- models/LAP/models_lapsrn.ipynb +0 -0
- models/RCAN/model.py +0 -0
- models/file.py +11 -0
models/LAP/models_lapsrn.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
models/RCAN/model.py
ADDED
File without changes
|
models/file.py
CHANGED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|