poltextlab commited on
Commit
eaa511e
1 Parent(s): 182d6c8
Files changed (1) hide show
  1. interfaces/emotion.py +1 -1
interfaces/emotion.py CHANGED
@@ -23,7 +23,7 @@ def build_huggingface_path(language: str):
23
 
24
  def predict(text, model_id, tokenizer_id):
25
  device = torch.device("cpu")
26
- model = AutoModelForSequenceClassification.from_pretrained(model_id, low_cpu_mem_usage=True, device_map="auto", token=HF_TOKEN)
27
  tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)
28
  model.to(device)
29
 
 
23
 
24
  def predict(text, model_id, tokenizer_id):
25
  device = torch.device("cpu")
26
+ model = AutoModelForSequenceClassification.from_pretrained(model_id, low_cpu_mem_usage=True, device_map="auto", offload_folder="offload", token=HF_TOKEN)
27
  tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)
28
  model.to(device)
29