Jarvislabs.ai

Gradio

Deploying a Gradio app is super simple.

Install Gradio

pip install gradio

Lets look at a simple example.

import gradio as gr
import os

def greet(name):
    return "Hello " + name + "!!"

demo = gr.Interface(fn=greet, inputs="text", outputs="text")

if __name__ == "__main__":
    demo.launch()

You can either execute the code in Jupyter notebook / standalone python code. Once it is running go to Jarvislabs.ai dashboard and right click 👆 on your instance and choose API endpoint.

Jarvislabs.ai API endpoint

You can start using the Gradio app from your browser or share with your friends/colleagues 😀.

Previous
Fast api