dennyaw commited on
Commit
02c6b08
1 Parent(s): a757e69

update model and tokenizer

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,9 +2,9 @@ import gradio as gr
2
  from transformers import AutoModelForCausalLM, AutoTokenizer
3
  import torch
4
 
5
- model_name="fadliaulawi/polylm-1.7b-finetuned"
6
- model = AutoModelForCausalLM.from_pretrained(model_name)
7
- tokenizer = AutoTokenizer.from_pretrained(model_name)
8
 
9
 
10
 
 
2
  from transformers import AutoModelForCausalLM, AutoTokenizer
3
  import torch
4
 
5
+ model = AutoModelForCausalLM.from_pretrained("DAMO-NLP-MT/polylm-1.7b")
6
+ model = PeftModel.from_pretrained(model, "fadliaulawi/polylm-1.7b-finetuned")
7
+ tokenizer = AutoTokenizer.from_pretrained("DAMO-NLP-MT/polylm-1.7b")
8
 
9
 
10