{"id":15024923,"url":"https://github.com/imfing/keras-flask-deploy-webapp","last_synced_at":"2025-05-15T21:04:23.314Z","repository":{"id":39339018,"uuid":"120212782","full_name":"imfing/keras-flask-deploy-webapp","owner":"imfing","description":":smiley_cat: Pretty \u0026 simple image classifier app template. Deploy your own trained model or pre-trained model (VGG, ResNet, Densenet) to a web app using Flask in 10 minutes.","archived":false,"fork":false,"pushed_at":"2024-03-24T20:14:23.000Z","size":101,"stargazers_count":1196,"open_issues_count":1,"forks_count":470,"subscribers_count":30,"default_branch":"main","last_synced_at":"2025-05-12T04:52:03.623Z","etag":null,"topics":["deep-learning","deployment","flask","keras","pre-trained","tensorflow","webapp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/imfing.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":"2018-02-04T18:49:54.000Z","updated_at":"2025-05-09T09:01:42.000Z","dependencies_parsed_at":"2024-12-14T17:02:49.573Z","dependency_job_id":"22f0a11c-4be3-4cd7-818a-b4b21f61aa0e","html_url":"https://github.com/imfing/keras-flask-deploy-webapp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Fkeras-flask-deploy-webapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Fkeras-flask-deploy-webapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Fkeras-flask-deploy-webapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imfing%2Fkeras-flask-deploy-webapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imfing","download_url":"https://codeload.github.com/imfing/keras-flask-deploy-webapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254422754,"owners_count":22068678,"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":["deep-learning","deployment","flask","keras","pre-trained","tensorflow","webapp"],"created_at":"2024-09-24T20:01:12.941Z","updated_at":"2025-05-15T21:04:23.291Z","avatar_url":"https://github.com/imfing.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy Keras Model with Flask as Web App in 10 Minutes\n\n[![](https://img.shields.io/badge/python-3.9%2B-green.svg)]()\n![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)\n\nA minimal and customizable repo to deploy your image models as web app easily.\n\n## Getting Started\n\n- Quick run with Docker:\n  ```bash\n  docker run --rm -p 5000:5000 ghcr.io/imfing/keras-flask-deploy-webapp:latest\n  ```\n- Go to http://localhost:5000 and enjoy :tada:\n\nScreenshot:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./docs/screenshot.avif\" height=\"420px\" alt=\"\"\u003e\n\u003c/p\u003e\n\n## New Features :fire:\n\n- Enhanced, mobile-friendly UI\n- Support image drag-and-drop\n- Use vanilla JavaScript, HTML and CSS. No jQuery or Bootstrap\n- Switch to TensorFlow 2.x and [tf.keras](https://www.tensorflow.org/guide/keras) by default\n- Upgrade Docker base image to Python 3.11\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/5097752/71065048-61c1c800-213e-11ea-92f1-274cbe4734ba.png\" height=\"330px\" alt=\"\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/5097752/71062921-aeef6b00-2139-11ea-8b23-6b9eb1e326ca.png\" height=\"330px\" alt=\"\"\u003e\n\u003c/p\u003e\n\n------------------\n\n## Run with Docker\n\n#### Use prebuilt image\n\n```\n$ docker run --rm -p 5000:5000 ghcr.io/imfing/keras-flask-deploy-webapp:latest\n```\n\n#### Build locally\n\nWith **[Docker](https://www.docker.com)**, you can quickly build and run the entire application in minutes :whale:\n\n```shell\n# 1. First, clone the repo\n$ git clone https://github.com/imfing/keras-flask-deploy-webapp.git\n$ cd keras-flask-deploy-webapp\n\n# 2. Build Docker image\n$ docker build -t keras_flask_app .\n\n# 3. Run!\n$ docker run -it --rm -p 5000:5000 keras_flask_app\n```\n\nOpen http://localhost:5000 and wait till the webpage is loaded.\n\n## Local Installation\n\nIt's easy to install and run it on your computer.\n\n```shell\n# 1. First, clone the repo\n$ git clone https://github.com/imfing/keras-flask-deploy-webapp.git\n$ cd keras-flask-deploy-webapp\n\n# 2. Install Python packages\n$ pip install -r requirements.txt\n\n# 3. Run!\n$ python app.py\n```\n\nOpen http://localhost:5000 and have fun. :smiley:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/5097752/71064959-3c34be80-213e-11ea-8e13-91800ca2d345.gif\" height=\"480px\" alt=\"\"\u003e\n\u003c/p\u003e\n\n------------------\n\n## Customization\n\nIt's also easy to customize and include your models in this app.\n\n\u003e **Note**\n\u003e Also consider [gradio](https://github.com/gradio-app/gradio) or [streamlit](https://github.com/streamlit/streamlit) to create complicated web apps for ML models.\n\n\u003cdetails\u003e\n \u003csummary\u003eDetails\u003c/summary\u003e\n\n### Use your own model\n\nPlace your trained `.h5` file saved by `model.save()` under models directory.\n\nCheck the [commented code](https://github.com/mtobeiyf/keras-flask-deploy-webapp/blob/master/app.py#L37) in app.py.\n\n### Use other pre-trained model\n\nSee [Keras applications](https://keras.io/applications/) for more available models such as DenseNet, MobilNet, NASNet, etc.\n\nCheck [this section](https://github.com/mtobeiyf/keras-flask-deploy-webapp/blob/master/app.py#L26) in app.py.\n\n### UI Modification\n\nModify files in `templates` and `static` directory.\n\n`index.html` for the UI and `main.js` for all the behaviors.\n\n\u003c/details\u003e\n\n## More Resources\n\n[Building a simple Keras + deep learning REST API](https://blog.keras.io/building-a-simple-keras-deep-learning-rest-api.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimfing%2Fkeras-flask-deploy-webapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimfing%2Fkeras-flask-deploy-webapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimfing%2Fkeras-flask-deploy-webapp/lists"}