poltextlab commited on
Commit
7658607
1 Parent(s): 554e6b4
Files changed (1) hide show
  1. interfaces/sentiment.py +1 -1
interfaces/sentiment.py CHANGED
@@ -24,7 +24,7 @@ def build_huggingface_path(language: str):
24
 
25
  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", token=HF_TOKEN)
28
  tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)
29
  model.to(device)
30
 
 
24
 
25
  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