Git Product home page Git Product logo

use-gradio-streamlit-sagemaker-studiolab's Introduction

Use Gradio or Streamlit on SageMaker Studio Lab

This repository shows a quick demo for how to run Gradio or Streamlit applications on SageMaker Studio Lab. Following the same capability for Tensorboard on SageMaker Studio, you can now apply the same to work with your Streamlit/Gradio application, except the default port (8051) set by Streamlit is not open.

streamlit-app.mp4

Watch YouTube Explainer Video

Use Gradio or Streamlit on SageMaker Studio Lab

Getting started

Requirements

How to run your apps

  • 0_demo_notebook.ipynb Open In SageMaker Studio Lab Notebook that runs Monocular Depth Estimation in Keras.
  • 1_launch_gradio_streamlit.ipynb Open In SageMaker Studio Lab Notebook with quick start to launch your apps.
  • app_gradio.py Gradio application
  • app_streamlit.py Streamlit application

Gradio

Use inline=False and server_port=6006.

gr.Interface(
    fn=infer,
    title="Monocular Depth Estimation",
    description = "Keras Implementation of Unet architecture with Densenet201 backbone for estimating the depth of image 📏",
    inputs=[gr.inputs.Image(label="image", type="numpy", shape=(640, 480))],
    outputs="image",
    article = "Author: <a href=\"https://huggingface.co/vumichien\">Vu Minh Chien</a>. Based on the Keras example from <a href=\"https://keras.io/examples/vision/depth_estimation/\">Victor Basu</a>. Repo: https://github.com/machinelearnear/use-gradio-streamlit-sagemaker-studiolab",
    examples=examples).launch(inline=False, server_port=6006, debug=True, cache_examples=True)

Then run with !python app_gradio.py either from the Terminal or from the 1_launch_gradio_streamlit.ipynb Notebook.

Streamlit

Use server.port 6006 and run from the Terminal or from the 1_launch_gradio_streamlit.ipynb Notebook.

!streamlit run app_streamlit.py --server.port 6006 # or 80/8080

References

See more implementations here https://paperswithcode.com/task/monocular-depth-estimation

use-gradio-streamlit-sagemaker-studiolab's People

Contributors

machinelearnear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

use-gradio-streamlit-sagemaker-studiolab's Issues

Gradio with Sagemaker Lab Studio

Hi, all, i have followed instruction to try run gradio from jupyter notebook inside sagemaker lab studio. Whrn tryng to open the domain url, i get error 500.

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.