check cuda
Browse files
app.py
CHANGED
@@ -4,7 +4,9 @@ import gradio as gr
|
|
4 |
def greet(name):
|
5 |
import torch
|
6 |
import pandas as pd
|
7 |
-
|
|
|
|
|
8 |
|
9 |
|
10 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
4 |
def greet(name):
|
5 |
import torch
|
6 |
import pandas as pd
|
7 |
+
flag = f"Hello {name}, we are using torch {torch.__version__}, pandas {pd.__version__}. \n"\
|
8 |
+
f"Cuda available is {torch.cuda.is_available()}, with total {torch.cuda.device_count()}"
|
9 |
+
return flag
|
10 |
|
11 |
|
12 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|