Skip to content

Latest commit

 

History

History
38 lines (20 loc) · 1019 Bytes

readme.md

File metadata and controls

38 lines (20 loc) · 1019 Bytes

Simple Keras REST API

This repository contains an example using Keras pre-trained models as service.

I'm using Flask to create an REST API to make predictions.

Getting started

This repository has a .devcontainer, so you can use a DevContainer with Visual Studio Code.

Starting Keras server

Use Makefile or launch python main.py

make server.run

Submiting requests to the keras server

Requests can be submittted via:

  1. CURL

`curl -X POST -F image=@data/lynx.jpg 'http://localhost:5000/api/predict'

Replace data/lynx.jpg with the path to your image.

  1. Simple Request python file

I've created a file simple_request.py, you can run to make a simple HTTP/POST request.

You can launch in your terminal

  • make playground
  • python simple_request.py

Problems with keras.models.load_model

has-no-attribute-populate_dict_with_module_objects