Spaces:
Runtime error
Runtime error
yuhaofeng-shiba
commited on
Commit
·
84a97f6
1
Parent(s):
7b48d93
Update app.py
Browse files
app.py
CHANGED
@@ -38,8 +38,9 @@ def init_model():
|
|
38 |
global lm_generation
|
39 |
torch.set_default_tensor_type(torch.HalfTensor)
|
40 |
model = LLaMa(args)
|
41 |
-
|
42 |
model = load_model(model, args.load_model_path)
|
|
|
43 |
model.eval()
|
44 |
|
45 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
38 |
global lm_generation
|
39 |
torch.set_default_tensor_type(torch.HalfTensor)
|
40 |
model = LLaMa(args)
|
41 |
+
torch.set_default_tensor_type(torch.FloatTensor)
|
42 |
model = load_model(model, args.load_model_path)
|
43 |
+
print('done load model.')
|
44 |
model.eval()
|
45 |
|
46 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|