윤다영
윤다영

Reputation: 35

how do i use 'from utils import sentence'?

from utils import sentence
sentences = sentence.Iterator(train_items,train_playlist, sentence.Mode.ALBUM)

I want to use 'sentence', but when I execute the code, an error appears. The error is as follows.

ImportError: cannot import name 'sentence' from 'utils' (/opt/conda/lib/python3.7/site-packages/utils/init.py)

python version: 3.7 utils version: 1.0.1

Upvotes: 0

Views: 1198

Answers (1)

jaleksi
jaleksi

Reputation: 71

Try from utils.sentence import Iterator and then do sentences = Iterator(...)

Upvotes: 0

Related Questions