|
|
--- |
|
|
license: mit |
|
|
datasets: |
|
|
- sweatSmile/FinanceQA |
|
|
language: |
|
|
- en |
|
|
base_model: |
|
|
- google-bert/bert-base-uncased |
|
|
--- |
|
|
# 💳 Credit Card Statement QA Model |
|
|
|
|
|
**Model Name:** `yakul259/credit-statement-scraper` |
|
|
**Base Model:** [`distilbert-base-uncased`](https://huggingface.co/distilbert-base-uncased) |
|
|
**Task:** Question Answering (Extractive QA) |
|
|
**Framework:** 🤗 Transformers |
|
|
**Language:** English |
|
|
**Author:** Yakul259 |
|
|
**License:** MIT |
|
|
|
|
|
--- |
|
|
|
|
|
## 🧠 Model Overview |
|
|
|
|
|
This model is a fine-tuned version of **DistilBERT** for **question answering** tasks, specifically designed to extract structured financial details from **credit card statements** in PDF or text format. |
|
|
|
|
|
It was trained on a custom dataset of anonymized statements to recognize and answer questions like: |
|
|
- “Which bank issued this statement?” |
|
|
- “What is the billing cycle?” |
|
|
- “What is the payment due date?” |
|
|
- “What are the last 4 digits of the card?” |
|
|
- “What is the total amount due?” |
|
|
|
|
|
--- |
|
|
|
|
|
## 🏗️ Architecture |
|
|
|
|
|
| Property | Value | |
|
|
|-----------|--------| |
|
|
| Model Type | DistilBERT | |
|
|
| Architecture | DistilBertForQuestionAnswering | |
|
|
| Hidden Size | 768 | |
|
|
| Layers | 6 | |
|
|
| Attention Heads | 12 | |
|
|
| Max Sequence Length | 512 | |
|
|
| Activation | GELU | |
|
|
| Dropout | 0.1 | |
|
|
| QA Dropout | 0.1 | |
|
|
| Vocabulary Size | 30,522 | |
|
|
| Transformers Version | 4.57.0 | |
|
|
|
|
|
--- |
|
|
|
|
|
## 🧾 Example Usage |
|
|
|
|
|
You can load this model directly using the `pipeline` API from 🤗 Transformers: |
|
|
|
|
|
```python |
|
|
from transformers import pipeline |
|
|
|
|
|
qa_pipeline = pipeline( |
|
|
"question-answering", |
|
|
model="yakul259/credit-statement-scraper", |
|
|
tokenizer="yakul259/credit-statement-scraper" |
|
|
) |
|
|
|
|
|
context = """ |
|
|
Bank: XYZ Bank |
|
|
Credit Card Number: **** **** **** 4321 |
|
|
Billing Period: 01/10/2025 - 31/10/2025 |
|
|
Payment Due Date: 15/11/2025 |
|
|
Total Amount Due: $1,254.67 |
|
|
""" |
|
|
|
|
|
question = "What is the payment due date?" |
|
|
result = qa_pipeline(question=question, context=context) |
|
|
print(result) |
|
|
|
|
|
## License |
|
|
This model is released under the [MIT License](https://opensource.org/licenses/MIT). |
|
|
|
|
|
### Attribution |
|
|
This model was fine-tuned from [DistilBERT base uncased](https://huggingface.co/distilbert-base-uncased), |
|
|
originally released by Hugging Face under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). |
|
|
|
|
|
While the fine-tuned weights are distributed under the MIT License, users should note that the underlying |
|
|
DistilBERT architecture and tokenizer originate from the Apache 2.0–licensed release. |
|
|
|