Instructions to use Falconsai/question_answering with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Falconsai/question_answering with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="Falconsai/question_answering")# Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("Falconsai/question_answering") model = AutoModelForQuestionAnswering.from_pretrained("Falconsai/question_answering") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,7 +8,7 @@ widget:
|
|
| 8 |
- text: "What's my name?"
|
| 9 |
context: "My name is Soren and I live in the Hills."
|
| 10 |
example_title: "Name"
|
| 11 |
-
- text: "What
|
| 12 |
context: "The development of agriculture began around 12,000 years ago during the Neolithic Revolution. Hunter-gatherers transitioned to cultivating crops and raising livestock. Independent centers of early agriculture thrived in the Fertile Crescent, Egypt, China, Mesoamerica and the Andes. Farming supported larger, settled societies leading to rapid cultural development and population growth."
|
| 13 |
example_title: "Advancement"
|
| 14 |
---
|
|
@@ -64,8 +64,6 @@ from transformers import AutoModelForQuestionAnswering
|
|
| 64 |
question = "What human advancement first emerged around 12,000 years ago during the Neolithic era?"
|
| 65 |
context = "The development of agriculture began around 12,000 years ago during the Neolithic Revolution. Hunter-gatherers transitioned to cultivating crops and raising livestock. Independent centers of early agriculture thrived in the Fertile Crescent, Egypt, China, Mesoamerica and the Andes. Farming supported larger, settled societies leading to rapid cultural development and population growth."
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
tokenizer = AutoTokenizer.from_pretrained("Falconsai/question_answering")
|
| 70 |
inputs = tokenizer(question, context, return_tensors="pt")
|
| 71 |
|
|
|
|
| 8 |
- text: "What's my name?"
|
| 9 |
context: "My name is Soren and I live in the Hills."
|
| 10 |
example_title: "Name"
|
| 11 |
+
- text: "What led to rapid development?"
|
| 12 |
context: "The development of agriculture began around 12,000 years ago during the Neolithic Revolution. Hunter-gatherers transitioned to cultivating crops and raising livestock. Independent centers of early agriculture thrived in the Fertile Crescent, Egypt, China, Mesoamerica and the Andes. Farming supported larger, settled societies leading to rapid cultural development and population growth."
|
| 13 |
example_title: "Advancement"
|
| 14 |
---
|
|
|
|
| 64 |
question = "What human advancement first emerged around 12,000 years ago during the Neolithic era?"
|
| 65 |
context = "The development of agriculture began around 12,000 years ago during the Neolithic Revolution. Hunter-gatherers transitioned to cultivating crops and raising livestock. Independent centers of early agriculture thrived in the Fertile Crescent, Egypt, China, Mesoamerica and the Andes. Farming supported larger, settled societies leading to rapid cultural development and population growth."
|
| 66 |
|
|
|
|
|
|
|
| 67 |
tokenizer = AutoTokenizer.from_pretrained("Falconsai/question_answering")
|
| 68 |
inputs = tokenizer(question, context, return_tensors="pt")
|
| 69 |
|