Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,9 +25,9 @@ has_cuda = torch.cuda.is_available()
|
|
25 |
# has_cuda = False # force cpu
|
26 |
|
27 |
if has_cuda:
|
28 |
-
model = AutoModel.from_pretrained(model_name,trust_remote_code=True).cuda() # 3.92
|
29 |
else:
|
30 |
-
model = AutoModel.from_pretrained(model_name,trust_remote_code=True).float()
|
31 |
|
32 |
model = model.eval()
|
33 |
|
|
|
25 |
# has_cuda = False # force cpu
|
26 |
|
27 |
if has_cuda:
|
28 |
+
model = AutoModel.from_pretrained(model_name, trust_remote_code=True).cuda() # 3.92
|
29 |
else:
|
30 |
+
model = AutoModel.from_pretrained(model_name, trust_remote_code=True) # .float()
|
31 |
|
32 |
model = model.eval()
|
33 |
|