Update README.md
Browse files
README.md
CHANGED
|
@@ -12,6 +12,35 @@ tags:
|
|
| 12 |
- 'Question_Answers'
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# ZenGQ
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
- 'Question_Answers'
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# ZenGQ - BERT for Question Answering
|
| 16 |
|
| 17 |
+
This is a fine-tuned BERT model for question answering tasks, trained on a custom dataset.
|
| 18 |
+
|
| 19 |
+
## Model Details
|
| 20 |
+
|
| 21 |
+
- **Model:** BERT-base-uncased
|
| 22 |
+
- **Task:** Question Answering
|
| 23 |
+
- **Dataset:** Custom dataset
|
| 24 |
+
|
| 25 |
+
## Usage
|
| 26 |
+
|
| 27 |
+
### Load the model
|
| 28 |
+
|
| 29 |
+
```python
|
| 30 |
+
from transformers import AutoTokenizer, AutoModelForQuestionAnswering, pipeline
|
| 31 |
+
|
| 32 |
+
tokenizer = AutoTokenizer.from_pretrained("prabinpanta0/ZenGQ")
|
| 33 |
+
model = AutoModelForQuestionAnswering.from_pretrained("prabinpanta0/ZenGQ")
|
| 34 |
+
|
| 35 |
+
qa_pipeline = pipeline("question-answering", model=model, tokenizer=tokenizer)
|
| 36 |
+
|
| 37 |
+
context = "Berlin is the capital of Germany."
|
| 38 |
+
question = "What is the capital of Germany?"
|
| 39 |
+
|
| 40 |
+
result = qa_pipeline(question=question, context=context)
|
| 41 |
+
print(f"Answer: {result['answer']}")
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
### Training Details
|
| 45 |
+
- Epochs: 3
|
| 46 |
+
- Training Loss: 2.050335, 1.345047, 1.204442
|