Fix: I'm a Python beginner
This commit is contained in:
@@ -28,7 +28,7 @@ def get_bert_feature(
|
|||||||
device = "mps"
|
device = "mps"
|
||||||
if not device:
|
if not device:
|
||||||
device = "cuda"
|
device = "cuda"
|
||||||
if device = "cuda" and not torch.cuda.is_available():
|
if device == "cuda" and not torch.cuda.is_available():
|
||||||
device = "cpu"
|
device = "cpu"
|
||||||
if device not in models.keys():
|
if device not in models.keys():
|
||||||
models[device] = DebertaV2Model.from_pretrained(LOCAL_PATH).to(device)
|
models[device] = DebertaV2Model.from_pretrained(LOCAL_PATH).to(device)
|
||||||
|
|||||||
Reference in New Issue
Block a user