Update README.md
Browse files
README.md
CHANGED
@@ -25,8 +25,13 @@ More information needed
|
|
25 |
|
26 |
## Intended uses & limitations
|
27 |
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
## Training and evaluation data
|
31 |
|
32 |
This model is trained and evaluated on the SQUAD dataset
|
|
|
25 |
|
26 |
## Intended uses & limitations
|
27 |
|
28 |
+
### Sample Usage
|
29 |
+
def generate_question(context):
|
30 |
+
inputs = tokenizer(context, return_tensors="pt")
|
31 |
+
output = model.generate(**inputs)
|
32 |
+
question = tokenizer.decode(output[0], skip_special_tokens=True)
|
33 |
+
return question
|
34 |
+
print(generate_question("Paris is the capital city of France"))
|
35 |
## Training and evaluation data
|
36 |
|
37 |
This model is trained and evaluated on the SQUAD dataset
|