コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 1 of about 1 for resnet (0.001 sec.)
パスパラメータ 9414
パスパラメータ Pythonのformat文字列と同様のシンタックスで「パスパラメータ」や「パス変数」を宣言できます: Python 3.8+ from fastapi import FastAPI app = FastAPI () @app . get ( "/items/ {item_id} " ) async def read_item ( item_id ): return { ... なります: Python 3.8+ from enum import Enum from fastapi import FastAPI class ModelName ( str , Enum ): alexnet = "alexnet" resnet = "resnet" lenet = "lenet" app = FastAPI () @app . get ( "/models/ {model_name} " ) async def get_model ( model_name : Mod ... message" : "Have some residuals" } 情報 Enumerations (もしくは、enums)はPython 3.4以降で利用できます 。 豆知識 "AlexNet"、"ResNet"そして"LeNet"は機械学習 モデル の名前です。 パスパラメータ の宣言 次に、作成したenumクラスである ModelName を使用した型アノ ... 成します: Python 3.8+ from enum import Enum from fastapi import FastAPI class ModelName ( str , Enum ): alexnet = "alexnet" resnet = "resnet" lenet = "lenet" app = FastAPI () @app . get ( "/models/ {model_name} " ) async def get_model ( model_name : Mod ...
https://man.mtool.work/fastapi/0.115/tutorial/path-params/
PREV 1 NEXT