Spaces:
Runtime error
Runtime error
File size: 275 Bytes
51df617 |
1 2 3 4 5 6 7 8 9 10 11 |
import gradio as gr
import torch
is_cuda = torch.cuda.is_available()
def greet(name):
if is_cuda:
return "Hello cuda" + name + "!!"
else:
return "Hello ooops" + name + "!!"
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch() |