poltextlab commited on
Commit
61e3c30
·
verified ·
1 Parent(s): 8096c7d

remove data folder

Browse files
Files changed (1) hide show
  1. interfaces/illframes.py +2 -1
interfaces/illframes.py CHANGED
@@ -66,7 +66,7 @@ def predict(text, model_id, tokenizer_id, label_names):
66
  # ---
67
 
68
  try:
69
- model = AutoModelForSequenceClassification.from_pretrained(model_id, low_cpu_mem_usage=True, device_map="auto", token=HF_TOKEN)
70
  except:
71
  disk_space = get_disk_space('/data/')
72
  print("Disk Space Error:")
@@ -97,6 +97,7 @@ def predict(text, model_id, tokenizer_id, label_names):
97
  def predict_illframes(text, language, domain):
98
  #DEBUG
99
  cache_dir = os.path.expanduser("~/.cache/huggingface")
 
100
  if os.path.exists(cache_dir):
101
  shutil.rmtree(cache_dir)
102
  #END DEBUG
 
66
  # ---
67
 
68
  try:
69
+ model = AutoModelForSequenceClassification.from_pretrained(model_id, low_cpu_mem_usage=True, offload_folder="offload", device_map="auto", token=HF_TOKEN)
70
  except:
71
  disk_space = get_disk_space('/data/')
72
  print("Disk Space Error:")
 
97
  def predict_illframes(text, language, domain):
98
  #DEBUG
99
  cache_dir = os.path.expanduser("~/.cache/huggingface")
100
+ shutil.rmtree("./data/")
101
  if os.path.exists(cache_dir):
102
  shutil.rmtree(cache_dir)
103
  #END DEBUG