File size: 384 Bytes
d413c28
8c9873a
d413c28
d2625c6
fe4704a
d413c28
d2625c6
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr

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

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

# import gradio as gr
# import spaces
# import torch

# @spaces.GPU
# def greet(name):
#     return f"Tensor: {torch.Tensor([0]).cuda()}, Name: {name}"

# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
# iface.launch()