I am following the tutorial here but it’s very vague: Run an Instant Model | Roboflow Docs
I use the exactly same function header the tutorial suggest to set up confidence threshold but it gives me this error:
InferenceHTTPClient.infer() got an unexpected keyword argument ‘confidence’
Can someone from roboflow tell me where to find it?
Hi Asriel,
Sorry for the troubles. There’s an error in the documentation and you can configure the confidence threshold like this:
# import the inference-sdk
import time
from inference_sdk import InferenceHTTPClient, InferenceConfiguration
# initialize the client
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("https://media.roboflow.com/inference/people-walking.jpg", model_id="balthasars-workspace/people-instant-8")
print(result)
See here for more information.
We’ll fix the docs asap. Please let me know if you got it working on your end 
system
Closed
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.