-1

enter image description here

How to import a directory to a file in the same directory ?? i have tried it this way but line 7 throws an error Module Not found.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
  • 2
    FYI `core.py` is not in the same directory as the directory `classification_model`. – mkrieger1 Apr 11 '23 at 19:25
  • Importing from your own package is hard. I recommend reading this: https://stackoverflow.com/questions/14132789/relative-imports-for-the-billionth-time – RedKnite Apr 16 '23 at 04:43

1 Answers1

0

your classification_model does not have an init file, try importing the specific file you want, like: import classification_model.pipeline as pipeline or something similar, alternatively you can add an __init__.py and add imports to whatever you want to expose, however maybe you should rethink your files hierarchy

ACoolName
  • 1
  • 1