Code:
from inference_sdk import InferenceHTTPClient
CLIENT = InferenceHTTPClient(
api_url="https://outline.roboflow.com",
api_key="dY93y6ohgGjkO5mHmJD2"
)
data = CLIENT.infer('orange.jpg', model_id="food-spoilage-status/2")
if data['predictions']:
for prediction in data['predictions']:
print(prediction['class'])
else:
print("No predictions found")
Sample Images


Python File