andreslu commited on
Commit
c926a01
·
1 Parent(s): 0f14897

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -1,5 +1,14 @@
1
  import gradio as gr
2
 
 
 
 
 
 
 
 
 
 
3
  def uppercase(text):
4
  return text.upper()
5
 
 
1
  import gradio as gr
2
 
3
+ import torch
4
+
5
+ if torch.cuda.is_available():
6
+ device = torch.device("cuda")
7
+ print('GPU is available')
8
+ else:
9
+ device = torch.device("cpu")
10
+ print('GPU is not available')
11
+
12
  def uppercase(text):
13
  return text.upper()
14