Spaces:
Runtime error
Runtime error
File size: 320 Bytes
e852933 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
from functools import lru_cache
from transformers import AutoModelForCausalLM, AutoModelForSequenceClassification
@lru_cache(3)
def get_lm(lm_name):
return AutoModelForCausalLM.from_pretrained(lm_name)
@lru_cache(3)
def get_cls(cls_name):
return AutoModelForSequenceClassification.from_pretrained(cls_name)
|