Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
|