Roboflow Inference - API problem

I’m trying to deploy a fine-tuned model (yard-wildlife/1) from my account to a Raspberry Pi (5). Following the instructions found here, I’ve installed inference, as well as exported my API key.

However, just running the small Python script ..

   import inference
   model = inference.get_model("yard-wildlife/1") 

.. yields an “API not authorized .. unauthorized access” error (even after revoking/regenerating a key)

(Note: inference.load_roboflow_model(), as shown in the link, doesn’t work .. this gives an ‘no attribute’ error .. so I just used get_model() as noted in some other related posts).

Any guidance on to how to get my model deployed for inferencing on the Pi would be appreciated.

Thanks,
Larry

I made a bit of progress by simply moving the API key within get_model() as suggested in this post. However, updating/amending my code snippet to ..

import inference
model = inference.get_model(model_id="yard-wildlife/1", api_key="my_api_key")
results = model.infer(image="my_test_image")

print(results[0])

.. to run inference on a test image unleashes a torrent of dependencies warnings (?) and no apparent inference (on an image that works fine when just using Roboflow browser).

So, one step forward, one step back ..

Larry

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.