Instructions to use ashishkat/questionAnswer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ashishkat/questionAnswer with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("ashishkat/questionAnswer") model = AutoModelForSeq2SeqLM.from_pretrained("ashishkat/questionAnswer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,14 +6,13 @@ import pandas as pd
|
|
| 6 |
import numpy as np
|
| 7 |
|
| 8 |
|
| 9 |
-
## loading tokenizer model
|
| 10 |
-
tokenizer = T5Tokenizer.from_pretrained(model_name)
|
| 11 |
|
| 12 |
-
|
|
|
|
| 13 |
model = T5ForConditionalGeneration.from_pretrained(model_name, return_dict=True)
|
| 14 |
|
| 15 |
-
def generate_answer(question, context):
|
| 16 |
|
|
|
|
| 17 |
"""Function gives the answer to the question asked, given context
|
| 18 |
|
| 19 |
question(str) : question asked by user
|
|
|
|
| 6 |
import numpy as np
|
| 7 |
|
| 8 |
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
|
| 11 |
+
tokenizer = T5Tokenizer.from_pretrained(model_name)
|
| 12 |
model = T5ForConditionalGeneration.from_pretrained(model_name, return_dict=True)
|
| 13 |
|
|
|
|
| 14 |
|
| 15 |
+
def generate_answer(question, context):
|
| 16 |
"""Function gives the answer to the question asked, given context
|
| 17 |
|
| 18 |
question(str) : question asked by user
|