Skip to content
Snippets Groups Projects

fix artifacts vs cache

Merged Antoine Gaudron-Desjardins requested to merge update_ci into main
Files
2
+ 3
1
@@ -18,6 +18,7 @@ host = os.getenv('MODEL_HOST')
port = os.getenv('MODEL_PORT')
model = os.getenv('MODEL_NAME')
def make_prediction(instances):
url = f"http://{host}:{port}/v1/models/{model}:predict"
data = json.dumps({"signature_name": "serving_default", "instances": instances.tolist()})
@@ -25,10 +26,11 @@ def make_prediction(instances):
json_response = requests.post(url, data=data, headers=headers)
try:
predictions = json.loads(json_response.text)['predictions']
except:
except BaseException:
print("prediction failed")
return predictions
async def handle_cameras():
db = SessionLocal()
Loading