GustavoYe commited on
Commit
c109c5c
1 Parent(s): 23b4c14

check cuda

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,7 +4,9 @@ import gradio as gr
4
  def greet(name):
5
  import torch
6
  import pandas as pd
7
- return f"Hello {name}, we are using torch {torch.__version__}, pandas {pd.__version__}"
 
 
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")