Click here to Skip to main content
15,615,280 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have deployed my App on Vertex AI endpoint. The endpoint is created successfully and I am getting "Active" status. But when I try to invoke the endpoint, I am getting the following error:

{ "error": { "code": 500, "message": "Prediction failed. Please contact", "status": "INTERNAL" } }

POST Request URL:${PROJECT_ID}/locations/us-central1/endpoints/${ENDPOINT_ID}:predict

Header: I am passing the required header i.e., Content-Type: application/json and Authorization token.

Body: { "instances": [{ "image_path": "" } ] }

Here is my flask code that I am using for prediction:

@app.route('/get_movie_genres/', methods=['POST'])
def main():
    request_json = request.get_json()
    request_instances = request_json['instances']
    image_path = request_instances[0]['image_path']
    predicted_genres = predict_(image_path)
    output = {'predictions':
                       'predicted_genres' : prediction
    return jsonify(output)

I have saved some images on Github and I am using those images (via Github path) in order to do the movie genre prediction.

Kindly let me know if I am doing something wrong and what might be causing the issue.

What I have tried:

I have tried invoking the endpoint using curl command, but still I am getting the permission related errors even though I have provided the authentication correctly.
Updated 6-May-22 10:56am
Richard MacCutchan 3-May-22 3:41am    
Why not do what the error message tells you? 12-May-22 5:47am    
What a problem. Deactivated API. Deactivated AUTH key. Then if that doesnt work, contact Google support.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900