Spaces:
Runtime error
Runtime error
add trust remote code
Browse files
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
|