zero-gpu-test0 / app.py
cbensimon's picture
cbensimon HF staff
Update app.py
b0f6b93
raw
history blame
218 Bytes
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()