demo 1
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import torch
|
|
8 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
9 |
|
10 |
|
11 |
-
|
12 |
def sysinfo():
|
13 |
RandomTensor = torch.randn(1, 2) # Example audio tensor
|
14 |
tensorExample = RandomTensor.to(device)
|
@@ -21,7 +21,7 @@ def sysinfo():
|
|
21 |
|
22 |
@spaces.GPU
|
23 |
def gpu():
|
24 |
-
return sysinfo(
|
25 |
|
26 |
|
27 |
def nogpu():
|
|
|
8 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
9 |
|
10 |
|
11 |
+
@torch.inference_mode()
|
12 |
def sysinfo():
|
13 |
RandomTensor = torch.randn(1, 2) # Example audio tensor
|
14 |
tensorExample = RandomTensor.to(device)
|
|
|
21 |
|
22 |
@spaces.GPU
|
23 |
def gpu():
|
24 |
+
return sysinfo();
|
25 |
|
26 |
|
27 |
def nogpu():
|