Spaces:
Runtime error
Runtime error
import gradio as gr | |
import torch | |
if torch.cuda.is_available(): | |
device = torch.device("cuda") | |
print('GPU is available') | |
else: | |
device = torch.device("cpu") | |
print('GPU is not available') | |
def uppercase(text): | |
return text.upper() | |
iface = gr.Interface(fn=uppercase, inputs="text", outputs="text") | |
iface.launch() | |