enable trust_remote_code=True
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ MODEL_LIST = [
|
|
| 19 |
@lru_cache(maxsize=None)
|
| 20 |
def get_pipeline(model_name):
|
| 21 |
tok = AutoTokenizer.from_pretrained(model_name)
|
| 22 |
-
mdl = AutoModelForCausalLM.from_pretrained(model_name, weights_only=False)
|
| 23 |
mdl.to("cuda")
|
| 24 |
return pipeline("text-generation", model=mdl, tokenizer=tok, device=0)
|
| 25 |
|
|
|
|
| 19 |
@lru_cache(maxsize=None)
|
| 20 |
def get_pipeline(model_name):
|
| 21 |
tok = AutoTokenizer.from_pretrained(model_name)
|
| 22 |
+
mdl = AutoModelForCausalLM.from_pretrained(model_name, weights_only=False, trust_remote_code=True)
|
| 23 |
mdl.to("cuda")
|
| 24 |
return pipeline("text-generation", model=mdl, tokenizer=tok, device=0)
|
| 25 |
|