Code Monkey home page Code Monkey logo

resnet50-demo-on-local's Introduction

resnet50 demo on local

The project demo can be experienced online on

Description

This project is a demo of how to deploy a Resnet50 model API using the Flask framework. We can build a model that can be accessed via a web API using Flask. This comes with many benefits, including saving server costs or containing some private data. For example, when you need to build a demo of a deep learning model that requires a GPU using SwanHub, HuggingFace, or Replicate, you can build an API on your local GPU server and access it using the Gradio backend online.

Pre-requisites you may need:

Flask is a lightweight web framework developed in Python. It is widely used to build web applications and APIs, as well as for rapid prototyping.

Docker is an open-source containerization platform designed to simplify the process of building, deploying, and managing applications. By using container technology, Docker allows developers to package an application and all its dependencies into a standalone, portable container.

Installation & Usage

This project consists of two parts, the model API service and the Gradio frontend rendering service. You can deploy them separately on two different servers (which need to be able to access each other), or you can deploy them on the same server.

The model API server can be run via Docker. Make sure the deployment server has Docker installed. You can refer to Install Docker for instructions. Run the following command to start it:

bash run.sh <API_PORT>

Replace <API_PORT> with the port number for the model API service, ensuring that it is not already in use.

The Gradio frontend server requires Python >= 3.8 to be installed on the server. Run the following command to install the necessary dependencies:

pip install -r requirements.txt

Alternatively, you can upload this project to SwanHub and choose to run the Gradio-based demo using the environment built from the requirements.txt file. Refer to Getting Started with SwanHub for a detailed tutorial. You can also deploy it using HuggingFace's Space or Replicate.

Next, run the following command to set the access URL for your model API:

export API_URL=http://<IP or URL>:<API_PORT>/model

Finally, run the following command to start your Gradio service:

python app.py

License

This project is licensed under the GPL license.

Author Information

This project is developed by shaohon chen.

For any inquiries or feedback, please contact shaohon chen via email: [email protected].

Thanks

Thanks for Auto-README help me write this readme! : )

resnet50-demo-on-local's People

Contributors

shaohonchen avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.