Jimin Park
commited on
Commit
·
eac2c48
1
Parent(s):
cd24c9d
updated req.txt and app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
from transformers import pipeline
|
2 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
from peft import PeftModel, PeftConfig
|
4 |
import gradio as gr
|
5 |
import torch
|
@@ -13,7 +13,7 @@ model = AutoModelForCausalLM.from_pretrained(base_model, torch_dtype=torch.bfloa
|
|
13 |
model = PeftModel.from_pretrained(model, peft_model_path)
|
14 |
tokenizer = AutoTokenizer.from_pretrained(base_model)
|
15 |
|
16 |
-
pipeline =
|
17 |
"text-generation",
|
18 |
model=model,
|
19 |
tokenizer=tokenizer,
|
|
|
1 |
from transformers import pipeline
|
2 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
3 |
from peft import PeftModel, PeftConfig
|
4 |
import gradio as gr
|
5 |
import torch
|
|
|
13 |
model = PeftModel.from_pretrained(model, peft_model_path)
|
14 |
tokenizer = AutoTokenizer.from_pretrained(base_model)
|
15 |
|
16 |
+
pipeline = pipeline(
|
17 |
"text-generation",
|
18 |
model=model,
|
19 |
tokenizer=tokenizer,
|