File size: 372 Bytes
7c8ea93
 
3203f38
7c8ea93
3203f38
23b4c14
c109c5c
 
 
3203f38
7c8ea93
 
3203f38
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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()