mkthoma commited on
Commit
953d7e3
1 Parent(s): b8d9bd4

app update

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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)