I installed FASTAPI and was running below mentioned code
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
and am getting below mentioned error in console on executing the file
(venv) D:\FASTAPI>uvicorn main:app --reload
INFO: Will watch for changes in these directories: ['D:\\FASTAPI']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [7900] using watchgod
ERROR: Error loading ASGI app. Attribute "app" not found in module "main".
I really appreciate any recommendations or suggestions