StuMS / app.py
GustavoYe's picture
check cuda
c109c5c
raw
history blame
372 Bytes
import gradio as gr
def greet(name):
import torch
import pandas as pd
flag = f"Hello {name}, we are using torch {torch.__version__}, pandas {pd.__version__}. \n"\
f"Cuda available is {torch.cuda.is_available()}, with total {torch.cuda.device_count()}"
return flag
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()