hosseinhimself
commited on
Commit
•
c362ce2
1
Parent(s):
912ab00
Update README.md
Browse files
README.md
CHANGED
@@ -59,17 +59,15 @@ model = AutoModelForQuestionAnswering.from_pretrained(model)
|
|
59 |
qa_pipeline = pipeline("question-answering", model=model, tokenizer=tokenizer)
|
60 |
|
61 |
# Example usage
|
62 |
-
context = "
|
63 |
|
64 |
-
question = "
|
65 |
|
66 |
-
# Modify the pipeline to return
|
67 |
-
results = qa_pipeline(question=question, context=context
|
68 |
-
|
69 |
-
# Display the answers
|
70 |
-
for idx, result in enumerate(results):
|
71 |
-
print(f"Answer {idx+1}: {result['answer']}")
|
72 |
|
|
|
|
|
73 |
```
|
74 |
|
75 |
## Datasets
|
|
|
59 |
qa_pipeline = pipeline("question-answering", model=model, tokenizer=tokenizer)
|
60 |
|
61 |
# Example usage
|
62 |
+
context = "شرکت فولاد مبارکه در سال 1371 تأسیس شد."
|
63 |
|
64 |
+
question = "چه زمانی شرکت فولاد مبارکه تأسیس شد؟"
|
65 |
|
66 |
+
# Modify the pipeline to return answer
|
67 |
+
results = qa_pipeline(question=question, context=context)
|
|
|
|
|
|
|
|
|
68 |
|
69 |
+
# Display the answer
|
70 |
+
print(results['answer'])
|
71 |
```
|
72 |
|
73 |
## Datasets
|