Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ import os
|
|
| 8 |
token=os.environ.get("key_")
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained("wasmdashai/vtk",token=token)
|
| 10 |
models= {}
|
| 11 |
-
|
| 12 |
def get_model(name_model):
|
| 13 |
global models
|
| 14 |
if name_model in models:
|
|
@@ -26,7 +26,7 @@ def get_model(name_model):
|
|
| 26 |
zero = torch.Tensor([0]).cuda()
|
| 27 |
print(zero.device) # <-- 'cpu' 🤔
|
| 28 |
import torch
|
| 29 |
-
@spaces.GPU
|
| 30 |
def modelspeech(text,name_model):
|
| 31 |
|
| 32 |
|
|
|
|
| 8 |
token=os.environ.get("key_")
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained("wasmdashai/vtk",token=token)
|
| 10 |
models= {}
|
| 11 |
+
@spaces.GPU
|
| 12 |
def get_model(name_model):
|
| 13 |
global models
|
| 14 |
if name_model in models:
|
|
|
|
| 26 |
zero = torch.Tensor([0]).cuda()
|
| 27 |
print(zero.device) # <-- 'cpu' 🤔
|
| 28 |
import torch
|
| 29 |
+
@spaces.GPU
|
| 30 |
def modelspeech(text,name_model):
|
| 31 |
|
| 32 |
|