sjrhuschlee
commited on
Commit
•
9d66e31
1
Parent(s):
8544700
Update README.md
Browse files
README.md
CHANGED
@@ -41,7 +41,12 @@ from transformers import(
|
|
41 |
model_name = "sjrhuschlee/flan-t5-base-squad2"
|
42 |
|
43 |
# a) Using pipelines
|
44 |
-
nlp = pipeline(
|
|
|
|
|
|
|
|
|
|
|
45 |
qa_input = {
|
46 |
'question': f'{nlp.tokenizer.cls_token}Where do I live?', # '<cls>Where do I live?'
|
47 |
'context': 'My name is Sarah and I live in London'
|
|
|
41 |
model_name = "sjrhuschlee/flan-t5-base-squad2"
|
42 |
|
43 |
# a) Using pipelines
|
44 |
+
nlp = pipeline(
|
45 |
+
'question-answering',
|
46 |
+
model=model_name,
|
47 |
+
tokenizer=model_name,
|
48 |
+
trust_remote_code=True,
|
49 |
+
)
|
50 |
qa_input = {
|
51 |
'question': f'{nlp.tokenizer.cls_token}Where do I live?', # '<cls>Where do I live?'
|
52 |
'context': 'My name is Sarah and I live in London'
|