tokenizer
Browse files- src/streamlit_app.py +1 -1
src/streamlit_app.py
CHANGED
|
@@ -71,7 +71,7 @@ def preprocess_function(examples, tokenizer):
|
|
| 71 |
return {key: tensor.to(device) for key, tensor in inputs.items()}
|
| 72 |
|
| 73 |
def generate_q(context, answer):
|
| 74 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
| 75 |
model = AutoModelForSeq2SeqLM.from_pretrained('shnl/inst-qg-vinewsqa-vit5')
|
| 76 |
instruction_qg = 'Hãy tạo ra câu hỏi từ nội dung của ngữ cảnh và câu trả lời dưới đây.',
|
| 77 |
examples = {"input_seq": str("### Instruction: \n"
|
|
|
|
| 71 |
return {key: tensor.to(device) for key, tensor in inputs.items()}
|
| 72 |
|
| 73 |
def generate_q(context, answer):
|
| 74 |
+
tokenizer = AutoTokenizer.from_pretrained('shnl/inst-qg-vinewsqa-vit5')
|
| 75 |
model = AutoModelForSeq2SeqLM.from_pretrained('shnl/inst-qg-vinewsqa-vit5')
|
| 76 |
instruction_qg = 'Hãy tạo ra câu hỏi từ nội dung của ngữ cảnh và câu trả lời dưới đây.',
|
| 77 |
examples = {"input_seq": str("### Instruction: \n"
|