Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,10 +3,8 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
3 |
|
4 |
# Load your fine-tuned model and tokenizer
|
5 |
model_name = "legacy107/flan-t5-large-bottleneck-adapter-cpgQA-unique"
|
6 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name
|
7 |
-
model = AutoModelForSeq2SeqLM.from_pretrained(
|
8 |
-
model_name, device_map="auto"
|
9 |
-
)
|
10 |
model.set_active_adapters("question_answering")
|
11 |
|
12 |
max_length = 512
|
|
|
3 |
|
4 |
# Load your fine-tuned model and tokenizer
|
5 |
model_name = "legacy107/flan-t5-large-bottleneck-adapter-cpgQA-unique"
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
7 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
|
|
|
|
8 |
model.set_active_adapters("question_answering")
|
9 |
|
10 |
max_length = 512
|