Instead of showing individual names on splitting and slicing the output of my code is still showing the whole path of the images.
I have also copied prateek bhaiyas code and pasted it, it is showing the same result.
While splitting and printing the labels i am unable to split it
Hi @Shivam-Goyal-209664276424532
Request you to share your code through the Coding Blocks IDE or Google Drive. It would be a lot easier for me to help you then.
Happy Learning!
Hi @Shivam-Goyal-209664276424532,
I ran your code and it’s working on my system. Maybe the problem is platform specific.
Request you try replacing the original splitting line with this one:
label = str(folder_dir).split("/")[-1][:-1]
label = str(folder_dir).split("/")[-1][:-1]
This is working, thanks a lot!
Glad I could be of some help!
hey @Shivam-Goyal-209664276424532 ,
we see that you have re-opened this doubt , is it done by mistake or is there something left to be resolved ?
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.