📝 Update docs, compare enums with identity instead of equality (#4905)

This commit is contained in:
Micael Jarniac 2022-08-26 10:26:03 -03:00 committed by GitHub
parent afe44f0b25
commit e3c055ba8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ app = FastAPI()
@app.get("/models/{model_name}")
async def get_model(model_name: ModelName):
if model_name == ModelName.alexnet:
if model_name is ModelName.alexnet:
return {"model_name": model_name, "message": "Deep Learning FTW!"}
if model_name.value == "lenet":