Skip to content

edinsonjim/simple-keras-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple REST API with Keras and ResNet50

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published