{"id":25844185,"url":"https://github.com/dicodingacademy/simple-api-tensorflowjs","last_synced_at":"2025-03-01T07:27:58.063Z","repository":{"id":204833673,"uuid":"712760621","full_name":"dicodingacademy/simple-api-tensorflowjs","owner":"dicodingacademy","description":"Repository ini digunakan untuk demo Bangkit 2023 H2 Guest Speaker Session mengenai tutorial membuat API untuk menangani inference machine learning. ","archived":false,"fork":false,"pushed_at":"2023-11-05T16:09:28.000Z","size":3,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-28T19:03:06.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dicodingacademy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-01T06:09:59.000Z","updated_at":"2024-06-01T16:56:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"e1fdc5db-f434-4e9b-9e25-4ea95f276d98","html_url":"https://github.com/dicodingacademy/simple-api-tensorflowjs","commit_stats":null,"previous_names":["dicodingacademy/simple-api-tensorflowjs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicodingacademy%2Fsimple-api-tensorflowjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicodingacademy%2Fsimple-api-tensorflowjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicodingacademy%2Fsimple-api-tensorflowjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicodingacademy%2Fsimple-api-tensorflowjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dicodingacademy","download_url":"https://codeload.github.com/dicodingacademy/simple-api-tensorflowjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241333986,"owners_count":19945914,"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":"2025-03-01T07:27:57.995Z","updated_at":"2025-03-01T07:27:58.055Z","avatar_url":"https://github.com/dicodingacademy.png","language":"JavaScript","readme":"# About this repo\nThis repo is used for demo Bangkit Guest Speaker Session H2.\nThe topic is about how to create API for machine learning inference.\n\n# Dependencies Project (main branch)\n1. Hapi Framework\n2. Tensorflow.js\n\n# Machine Learning Model\nThe model was made from course \"Belajar Machine Learning untuk Pemula\" and exported as Keras Model (.h5).\nAfter that, because this demo is use tensorflowjs, the model should be convert to tensorflow.js model.\n\nHere is the code in Python how to convert keras model (.h5) to tensorflow.js model. \nMake sure your tensorflow.js already installed on your local computer.\n\n```python\nfrom tensorflow.keras.models import load_model\nimport tensorflowjs as tfjs\n\nmodel_path = load_model(\"\u003cPath to your model\u003e\")\noutput_path = \"\u003cOutput path after your model is converted\u003e\"\n\ntfjs.converters.save_keras_model(model_path, output_path)\n```\n\nOr you can use bash.\n\n```bash\ntensorflowjs_converter --input_format=keras \u003cpath to your model\u003e \u003coutput_path\u003e\n```\n\n# Installation\nIf you want to try this project,\n1. Clone this project\n\n```bash\ngit clone https://github.com/dicodingacademy/simple-api-tensorflowjs.git\n```\n\n2. Install dependencies\n\n```bash\nnpm i\n```\n\n3. Run development script\n\n```\nnpm run dev\n```\n\n# Deploy to Compute Engine Instance\nFollow this step to deploy the apps to Compute Engine Instance\n1. Set firewall rule\n\nSet the firewall rule for port 3000 (because this server is running on port 3000).\n\n2. Create your instance\n\nCreate your instance based on your preference and apply the firewall rule via [target tags](https://cloud.google.com/vpc/docs/add-remove-network-tags).\n\n3. Connect to the instance via SSH.\n4. Install [Nodejs](https://nodejs.org/en/download/package-manager#nvm)\n5. Follow the installation steps.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdicodingacademy%2Fsimple-api-tensorflowjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdicodingacademy%2Fsimple-api-tensorflowjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdicodingacademy%2Fsimple-api-tensorflowjs/lists"}