Commit
·
7fb70b4
1
Parent(s):
2d36e54
Update README.md
Browse files
README.md
CHANGED
|
@@ -22,11 +22,12 @@ This is a parsbert-based model for multiple-choice question answering.
|
|
| 22 |
Here is an example of how you can run this model:
|
| 23 |
|
| 24 |
```python
|
| 25 |
-
from transformers import
|
| 26 |
|
| 27 |
model_name = "persiannlp/parsbert-base-parsinlu-multiple-choice"
|
| 28 |
-
tokenizer =
|
| 29 |
-
|
|
|
|
| 30 |
|
| 31 |
|
| 32 |
def run_model(input_string):
|
|
|
|
| 22 |
Here is an example of how you can run this model:
|
| 23 |
|
| 24 |
```python
|
| 25 |
+
from transformers import AutoConfig, AutoModelForMultipleChoice, AutoTokenizer
|
| 26 |
|
| 27 |
model_name = "persiannlp/parsbert-base-parsinlu-multiple-choice"
|
| 28 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 29 |
+
config = AutoConfig.from_pretrained(model_name)
|
| 30 |
+
model = AutoModelForMultipleChoice.from_pretrained(model_name, config = config)
|
| 31 |
|
| 32 |
|
| 33 |
def run_model(input_string):
|