Spaces:
Runtime error
Runtime error
FlawedLLM
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,15 @@
|
|
1 |
import re
|
2 |
from peft import PeftModel, PeftConfig
|
3 |
-
from
|
4 |
-
|
5 |
|
6 |
@spaces.GPU(duration=300)
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
11 |
def chunk_it(input_command):
|
12 |
inputs = tokenizer(
|
13 |
[
|
|
|
1 |
import re
|
2 |
from peft import PeftModel, PeftConfig
|
3 |
+
from peft import AutoPeftModelForCausalLM
|
4 |
+
from transformers import AutoTokenizer
|
5 |
|
6 |
@spaces.GPU(duration=300)
|
7 |
+
|
8 |
+
model = AutoPeftModelForCausalLM.from_pretrained(
|
9 |
+
"FlawedLLM/BhashiniLLM", # YOUR MODEL YOU USED FOR TRAINING
|
10 |
+
load_in_4bit = load_in_4bit,
|
11 |
+
)
|
12 |
+
tokenizer = AutoTokenizer.from_pretrained("lora_model")
|
13 |
def chunk_it(input_command):
|
14 |
inputs = tokenizer(
|
15 |
[
|