rudalle / app.py
apolinario's picture
Initial
16aa660
raw
history blame
275 Bytes
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()