Spaces:
Sleeping
Sleeping
File size: 283 Bytes
2e3c4e2 a65b44b 2e3c4e2 a65b44b 2e3c4e2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
import spaces
import torch
tensor = torch.zeros(3).cuda()
print(tensor.device)
@spaces.GPU
def greet(name):
print(tensor.device)
return "Hello pixi pablo " + name + "!!"
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch() |