Spaces:
Runtime error
Runtime error
app update
Browse files
app.py
CHANGED
@@ -3,8 +3,8 @@ from transformers import pipeline
|
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
4 |
|
5 |
model_path = "finetuned_phi2"
|
6 |
-
model = AutoModelForCausalLM.from_pretrained(model_path)
|
7 |
-
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
8 |
|
9 |
gen = pipeline('text-generation', model=model, tokenizer=tokenizer)
|
10 |
result = gen(prompt)
|
|
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
4 |
|
5 |
model_path = "finetuned_phi2"
|
6 |
+
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True)
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
|
8 |
|
9 |
gen = pipeline('text-generation', model=model, tokenizer=tokenizer)
|
10 |
result = gen(prompt)
|