Run an Instant Model
Python SDK と Serverless Hosted API V2 を使用して Roboflow Instant モデルを実行できます。
Instant モデルを実行するには、次のコードを使用します:
from inference_sdk import InferenceHTTPClient, InferenceConfiguration
CLIENT = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key="<Your API Key>",
)
configuration = InferenceConfiguration(
confidence_threshold=0.95
)
CLIENT.configure(configuration)
result = client.infer("image.jpeg", model_id="model-id/1")
print(result)上記で、次を指定してください: model ID および API key.
このコードはモデルを実行し、結果を返します。
Last updated
Was this helpful?