{"id":16703427,"url":"https://github.com/krystianity/keras-serving","last_synced_at":"2025-03-17T01:30:54.930Z","repository":{"id":21154284,"uuid":"91851306","full_name":"krystianity/keras-serving","owner":"krystianity","description":"bring keras-models to production with tensorflow-serving and nodejs + docker :pizza:","archived":false,"fork":false,"pushed_at":"2022-12-09T16:54:32.000Z","size":21699,"stargazers_count":153,"open_issues_count":13,"forks_count":27,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-04-15T07:39:12.379Z","etag":null,"topics":["cpp","docker","grpc","keras","network","neuronal","nodejs","production","python","serving","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krystianity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-19T22:58:56.000Z","updated_at":"2024-04-02T05:28:43.000Z","dependencies_parsed_at":"2023-01-12T03:31:14.056Z","dependency_job_id":null,"html_url":"https://github.com/krystianity/keras-serving","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krystianity%2Fkeras-serving","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krystianity%2Fkeras-serving/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krystianity%2Fkeras-serving/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krystianity%2Fkeras-serving/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krystianity","download_url":"https://codeload.github.com/krystianity/keras-serving/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835942,"owners_count":20355611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","docker","grpc","keras","network","neuronal","nodejs","production","python","serving","tensorflow"],"created_at":"2024-10-12T19:08:18.875Z","updated_at":"2025-03-17T01:30:52.904Z","avatar_url":"https://github.com/krystianity.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keras-serving\n\nkeras-\u003etensorflow+grpc+docker=\u003enodejs :whale::fire:\n\n- example of bringing a keras model to production using tensorflow serving\n- using custom XOR model with tensor.proto dimensions example\n- building \u0026 training of the model works with python2.7 on the workstation\n- exported model is served via grpc in a C++ server using a Docker-Container\n- a nodejs server wraps the grpc api for a simple http POST endpoint\n- also ships an advanced multi-model face (emotion, gender) detection example `/face-recog`\n- and and advanced google bigquery (as dataaset) example `/bigquery`\n\n# Overview\n\n* XOR Setup below\n* [Face-Recog Setup](face-recog/)\n* [BigQuery Setup](bigquery/)\n\n\n# Workflow (Unix - testen on Ubuntu 16.04 64bit)\n\n## You will need\n\n```\npython\npip\ndocker (docker-compose)\n```\n\n## 1. Install Requirements\n\n```\n./prepare.sh\n# installs python dependencies via pip\n# builds the docker image for tensorflow_serving (takes a while ~ 30 minutes)\n# image size ~ 3.5 GB\n```\ncheckout [build troubleshoot](build.md) if you are having trouble\n\n## 2. Build, Train and Serialise Keras Model\n\n```\npython train.py\n# results will be in (/result)\n```\n\n## 3. Load and export Model as Tensorflow Graph\n\n```\npython export.py\n# results will be in (/export)\n```\n\n## 4. Build \u0026 Run Containers via docker-compose\n\n```\n./start-servers.sh\n# ./stop-servers.sh\n```\n\n## 5. Test API via curl\n\n```\ncurl -X POST \\\n  http://localhost:8080/predict-xor \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: application/json' \\\n  -d '{\"inputs\": [0,1]}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrystianity%2Fkeras-serving","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrystianity%2Fkeras-serving","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrystianity%2Fkeras-serving/lists"}