Spaces:
Running
Running
remove implicit model placement
Browse files- interfaces/emotion9.py +0 -1
interfaces/emotion9.py
CHANGED
@@ -26,7 +26,6 @@ def predict(text, model_id, tokenizer_id):
|
|
26 |
device = torch.device("cpu")
|
27 |
model = AutoModelForSequenceClassification.from_pretrained(model_id, low_cpu_mem_usage=True, device_map="auto", offload_folder="offload", token=HF_TOKEN)
|
28 |
tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)
|
29 |
-
model.to(device)
|
30 |
|
31 |
inputs = tokenizer(text,
|
32 |
max_length=512,
|
|
|
26 |
device = torch.device("cpu")
|
27 |
model = AutoModelForSequenceClassification.from_pretrained(model_id, low_cpu_mem_usage=True, device_map="auto", offload_folder="offload", token=HF_TOKEN)
|
28 |
tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)
|
|
|
29 |
|
30 |
inputs = tokenizer(text,
|
31 |
max_length=512,
|