my repo directory looks like
src/
notebooks/
web/
one/
two/
app/
when I am under two I can lunch my fastapi app using
uvicorn app.app:app --reload --host=0.0.0.0 --port=7000
however, I am going to deploy my model on heorku and the Procfile should be at the main path. I know I have to make a Procfile and add
web: uvicorn app.app:app --reload --host=0.0.0.0 --port=7000
but I can't run the app from other folders. It would give the error
ModuleNotFoundError: No module named 'app'
UPDATE
the output of find web/two/app is as following

so when I run uvicorn web.two.app.app:app --reload --port=7000
the error is

You have to provide the entire path from root to the app. In your case it should look like this:
uvicorn web.two.app.app:app --reload --host=0.0.0.0 --port=7000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With