Spaces:
Sleeping
Sleeping
Update inference.py
Browse files- inference.py +2 -1
inference.py
CHANGED
@@ -360,7 +360,8 @@ def load_model(ckpt_dir, device):
|
|
360 |
# model = fabric.setup(model)
|
361 |
state_dict = lazy_load(ckpt_dir + "/lit_model.pth")
|
362 |
model.load_state_dict(state_dict, strict=True)
|
363 |
-
model.to(device)
|
|
|
364 |
|
365 |
return fabric, model, text_tokenizer, snacmodel, whispermodel
|
366 |
|
|
|
360 |
# model = fabric.setup(model)
|
361 |
state_dict = lazy_load(ckpt_dir + "/lit_model.pth")
|
362 |
model.load_state_dict(state_dict, strict=True)
|
363 |
+
model = model.to(device)
|
364 |
+
model.eval()
|
365 |
|
366 |
return fabric, model, text_tokenizer, snacmodel, whispermodel
|
367 |
|