I'm trying to import a method from a python module but getting it's throwing an error mentioned below.
cannot import name 'methodname' from 'modulename'
my directory structure:
there are solutions to this problem but those are already satisfied in my case. Below is how I tried to import the method from the module.
from text_preprocessing import TextToTensor, clean_text
here TextToTensor
is aclass name and clean_text
is a method in TextToTensor class.
of Course, I can create an instance of TextToTensor
and use to call the clean_text
method, but I'm desperate to import the function.
thanks in advance.