Extracting labels from the folder is not working

I’ve doing the exact same process as per directed but I was unable to extract label from the folder name…One thing to mention is I’m using MAC OS X .

this is the link of screenshot : https://drive.google.com/file/d/1rgG3TTP7tbYRL7uMiO9A8FKSy80EVyOo/view?usp=sharing

Hey @S18MLOL0007,

Try replacing the last line with this:

print( str(folder_dir).split('/')[-1] )

Let me know if this works!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.