{"id":15976835,"url":"https://github.com/wamuir/golang-tf-api","last_synced_at":"2025-09-09T15:36:00.386Z","repository":{"id":55515305,"uuid":"286260935","full_name":"wamuir/golang-tf-api","owner":"wamuir","description":null,"archived":false,"fork":false,"pushed_at":"2020-12-24T15:14:21.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-13T19:43:18.820Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wamuir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-09T15:11:31.000Z","updated_at":"2020-12-24T15:14:23.000Z","dependencies_parsed_at":"2022-08-15T02:10:40.967Z","dependency_job_id":null,"html_url":"https://github.com/wamuir/golang-tf-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wamuir/golang-tf-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wamuir%2Fgolang-tf-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wamuir%2Fgolang-tf-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wamuir%2Fgolang-tf-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wamuir%2Fgolang-tf-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wamuir","download_url":"https://codeload.github.com/wamuir/golang-tf-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wamuir%2Fgolang-tf-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274318560,"owners_count":25263100,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-07T22:41:17.935Z","updated_at":"2025-09-09T15:36:00.321Z","avatar_url":"https://github.com/wamuir.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# golang-tf-api\n\n\n## About\n\nAPI for a character-level convolutional neural network, using a model\nexported from tensorflow. The API binds to port 5000 by default, and\ninferences can be obtained by posting to `/predict`, optionally with\na limit on the number of predicted classes to be returned, such as\n`/predict?page[limit]=10`.\n\n\n## application/json\n\n```sh\ncurl -XPOST -d '{\"input\":\"portal gun\"}' -i http://localhost:5000/predict\n```\n\nThis returns product service codes and probability estimates, such as:\n\n```json\n{\n    \"classes\":[\n        {\"id\":\"string\",\"pr\":\"float32\"},\n        {\"id\":\"string\",\"pr\":\"float32\"},\n        {\"id\":\"string\",\"pr\":\"float32\"}\n    ],\n    \"meta\":{\n        \"gini-impurity\":\"float32\",\n        \"relative-entropy\":\"float32\",\n        \"shannon-entropy\":\"float32\"\n    }\n}\n```\n\nWith classes in the relevant classlist identified by `id` and sorted in\ndescending order by corresponding probability (`pr`).\n\n\n\n## application/vnd.api+json\n\nThe API will negotiate content for [JSON API](https://jsonapi.org).\n\n```sh\ncurl -X POST -H 'Accept: application/vnd.api+json' \\\n     -H 'Content-Type: application/vnd.api+json' \\\n     -d '{\"data\":{\"type\": \"descriptions\", \"attributes\":{\"raw\": \"portal gun\"}}}' \\\n     -i 'http://localhost:5000/predict'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwamuir%2Fgolang-tf-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwamuir%2Fgolang-tf-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwamuir%2Fgolang-tf-api/lists"}