Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,16 @@ import os
|
|
3 |
import logging
|
4 |
from modules.auth.auth import create_auth_interface
|
5 |
from modules.database.database_init import initialize_database_connections
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
# Configuraci贸n b谩sica
|
8 |
logging.basicConfig(level=logging.INFO)
|
|
|
3 |
import logging
|
4 |
from modules.auth.auth import create_auth_interface
|
5 |
from modules.database.database_init import initialize_database_connections
|
6 |
+
import spaces
|
7 |
+
import torch
|
8 |
+
|
9 |
+
zero = torch.Tensor([0]).cuda()
|
10 |
+
print(zero.device) # <-- 'cpu' 馃
|
11 |
+
|
12 |
+
@spaces.GPU
|
13 |
+
def greet(n):
|
14 |
+
print(zero.device) # <-- 'cuda:0' 馃
|
15 |
+
return f"Hello {zero + n} Tensor"
|
16 |
|
17 |
# Configuraci贸n b谩sica
|
18 |
logging.basicConfig(level=logging.INFO)
|