{"id":19614691,"url":"https://github.com/activestate/tensorflask","last_synced_at":"2025-10-07T23:05:28.713Z","repository":{"id":28081776,"uuid":"112228599","full_name":"ActiveState/tensorflask","owner":"ActiveState","description":"Simple example hosting TensorFlow model as Flask service","archived":false,"fork":false,"pushed_at":"2023-02-08T04:41:20.000Z","size":4947,"stargazers_count":20,"open_issues_count":24,"forks_count":14,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-04-05T04:51:15.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ActiveState.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-27T17:47:22.000Z","updated_at":"2023-06-27T12:06:12.000Z","dependencies_parsed_at":"2024-11-11T10:53:28.708Z","dependency_job_id":"6c10b3e4-2ecf-4b2d-a513-51346d414a5b","html_url":"https://github.com/ActiveState/tensorflask","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/ActiveState%2Ftensorflask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Ftensorflask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Ftensorflask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Ftensorflask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ActiveState","download_url":"https://codeload.github.com/ActiveState/tensorflask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251234108,"owners_count":21556785,"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":[],"created_at":"2024-11-11T10:53:22.447Z","updated_at":"2025-10-07T23:05:28.619Z","avatar_url":"https://github.com/ActiveState.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tensorflask\nThis is a simple example of hosting a TensorFlow model as Flask service for inference. It provides the \"Poodle, Pug or Weiner Dog?\" image identification service using a retrained MobileNet model. The retrained model/labels are provided here to let you run the service locally.\n\n## Setup\n1. You need Python 3.x with Flask and TensorFlow installed. You can [download ActivePython 3.5](https://www.activestate.com/activepython/downloads) which has all the required dependencies already pre-installed.\n2. Clone to repository by clicking the clone button above.\n3. Run `python app.py`.\n\n## Usage\nOnce you've started the service, you can query it on `localhost:8000`. You can either hit it via a web browser, or use `curl` from the commandline. It takes a single parameter `file` which specifies the full path to a local image, so for example:\n\n`curl http://localhost:8000?file=/home/pete/mypoodle.jpg`\n\nWill send the photo to the service, which will run the model and return JSON identifying the probabilties of each type of dog breed. In this case you'll get results like:\n\n```json\n[\n  [\n    \"poodle\", \n    \"pug\", \n    \"dachshund\"\n  ], \n  [\n    0.9994891881942749, \n    1.1696176443365403e-05, \n    0.0004991634050384164\n  ]\n]\n```\n\nAnd you can see that the model is 99% sure that the image is a poodle.\n\n## License\n\nLicensed under the Apache 2.0 license. See LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivestate%2Ftensorflask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factivestate%2Ftensorflask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivestate%2Ftensorflask/lists"}