File size: 469 Bytes
e706bd1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio

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

gradio_interface = gradio.Interface(
  fn=my_inference_function,
  inputs="text",
  outputs="text",
  examples=[
    ["Jill"],
    ["Sam"]
  ],
  title="REST API Demo",
  description="This is a demo of how to build an AI powered REST API with Gradio and Huggingface Spaces See the **Use via API** link at the bottom of this page.",
  article="© Infinity Intel"
)
gradio_interface.launch()