Spaces:
Running
Running
vickeee465
commited on
Commit
·
41bc8d2
1
Parent(s):
e390ccc
ups
Browse files
utils.py
CHANGED
@@ -20,11 +20,11 @@ models = [hf_manifesto_path(""), hf_sentiment_path(""), hf_emotion_path("")]
|
|
20 |
tokenizers = ["xlm-roberta-large"]
|
21 |
|
22 |
def download_hf_models():
|
23 |
-
for
|
24 |
model = AutoModelForSequenceClassification.from_pretrained(model_id, low_cpu_mem_usage=True, device_map="auto",
|
25 |
token=HF_TOKEN)
|
26 |
del model
|
27 |
-
for
|
28 |
tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)
|
29 |
del tokenizer
|
30 |
|
|
|
20 |
tokenizers = ["xlm-roberta-large"]
|
21 |
|
22 |
def download_hf_models():
|
23 |
+
for model_id in models:
|
24 |
model = AutoModelForSequenceClassification.from_pretrained(model_id, low_cpu_mem_usage=True, device_map="auto",
|
25 |
token=HF_TOKEN)
|
26 |
del model
|
27 |
+
for tokenizer_id in tokenizers:
|
28 |
tokenizer = AutoTokenizer.from_pretrained(tokenizer_id)
|
29 |
del tokenizer
|
30 |
|