zerogpu-test / app.py
JasonJwba
Update app.py
16c4918 verified
raw
history blame
511 Bytes
import gradio as gr
import spaces
import torch
# def greet(name):
# return "Hello " + name + "!!"
@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()
# 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()