dennyaw commited on
Commit
b33dee8
1 Parent(s): b0a6dfd

add trust remote code

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,9 +3,9 @@ import torch
3
  from peft import PeftModel
4
  import gradio as gr
5
 
6
- model = AutoModelForCausalLM.from_pretrained("internlm/internlm-7b")
7
  model = PeftModel.from_pretrained(model, "fadliaulawi/internlm-7b-finetuned")
8
- tokenizer = AutoTokenizer.from_pretrained("internlm/internlm-7b", padding_side="left", use_fast = False)
9
 
10
  def generate_prompt(
11
  instruction, input, label
 
3
  from peft import PeftModel
4
  import gradio as gr
5
 
6
+ model = AutoModelForCausalLM.from_pretrained("internlm/internlm-7b",trust_remote_code=True)
7
  model = PeftModel.from_pretrained(model, "fadliaulawi/internlm-7b-finetuned")
8
+ tokenizer = AutoTokenizer.from_pretrained("internlm/internlm-7b", padding_side="left", use_fast = False,trust_remote_code=True)
9
 
10
  def generate_prompt(
11
  instruction, input, label