Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,8 +32,6 @@ import gradio as gr
|
|
32 |
from vocos import Vocos
|
33 |
from transformers import WhisperProcessor, WhisperForConditionalGeneration
|
34 |
|
35 |
-
torch.serialization.add_safe_globals([pathlib.WindowsPath])
|
36 |
-
|
37 |
torch._C._jit_set_profiling_executor(False)
|
38 |
torch._C._jit_set_profiling_mode(False)
|
39 |
torch._C._set_graph_executor_optimize(False)
|
@@ -58,7 +56,7 @@ model = VALLE(
|
|
58 |
prepend_bos=True,
|
59 |
num_quantizers=NUM_QUANTIZERS,
|
60 |
).to(device)
|
61 |
-
checkpoint = torch.load("./epoch-10.pt", map_location='cpu'
|
62 |
missing_keys, unexpected_keys = model.load_state_dict(
|
63 |
checkpoint["model"], strict=True
|
64 |
)
|
|
|
32 |
from vocos import Vocos
|
33 |
from transformers import WhisperProcessor, WhisperForConditionalGeneration
|
34 |
|
|
|
|
|
35 |
torch._C._jit_set_profiling_executor(False)
|
36 |
torch._C._jit_set_profiling_mode(False)
|
37 |
torch._C._set_graph_executor_optimize(False)
|
|
|
56 |
prepend_bos=True,
|
57 |
num_quantizers=NUM_QUANTIZERS,
|
58 |
).to(device)
|
59 |
+
checkpoint = torch.load("./epoch-10.pt", map_location='cpu')
|
60 |
missing_keys, unexpected_keys = model.load_state_dict(
|
61 |
checkpoint["model"], strict=True
|
62 |
)
|