Update README.md
Browse files
README.md
CHANGED
|
@@ -45,8 +45,7 @@ tokenizer = AutoTokenizer.from_pretrained("paytm/text2graph1.5b-int4")
|
|
| 45 |
|
| 46 |
|
| 47 |
# Prepare your input text
|
| 48 |
-
text =
|
| 49 |
-
''
|
| 50 |
{
|
| 51 |
"task": "Extract structured information from SMS messages to identify financial details, message purpose, and related information",
|
| 52 |
"instructions": [
|
|
@@ -81,16 +80,17 @@ text = """
|
|
| 81 |
"key_themes: Extract only 3-5 main themes actually discussed in the SMS as an array of strings - avoid redundant or fabricated themes",
|
| 82 |
"message_type: Categorize as exactly one of: alert message, delayed payment, repayment reminder, auto-pay reminder, refund information, payment failed information, settlement notification by payment aggregator, loan_emi_reminder, emi_confirmation, loan_offer, new_merchant_acquisition, product_offer",
|
| 83 |
"product_type: Identify as one of: credit card, debit card, home loan, vehicle loan, merchant_qr_kit, soundbox (or null if not mentioned)",
|
| 84 |
-
"aggregator_name: Extract payment aggregator name like paytm, phonepe, gpay , bharatpe, one 97 communications (or null if not mentioned). The namees can be written with differen caps lock , inside urls etc. Pay attention and extract it correctly.",
|
| 85 |
"bank_nbfc_fintech_name: Extract the name of the financial institution the message is from (or null if not present). A bank might have aggregator service but dont confuse the bank with aggregator",
|
| 86 |
"emi_amount: Extract only a clearly identified EMI amount as a float number (or null if not mentioned)",
|
| 87 |
"Total_overdue_amount: Extract only a clearly identified total overdue or bill amount as a float (or null if not mentioned)",
|
| 88 |
-
"available_bank_balance: Extract only a clearly identified available bank balance as a float (or null if not mentioned)",
|
| 89 |
"min_overdue_amount: Extract only a clearly identified minimum amount due as a float (or null if not mentioned)",
|
| 90 |
"overdue_date: Extract only a clearly identified payment due date as string (or null if not mentioned)",
|
| 91 |
"collection_team_lead: Extract only explicit mentions of collection team involvement (or null if not present)",
|
| 92 |
"legal_notice: Extract only explicit mentions of legal notices (or null if not mentioned)",
|
| 93 |
-
"customer_name: Extract only an explicitly identified customer name (or null if not mentioned)"
|
|
|
|
| 94 |
],
|
| 95 |
**example**
|
| 96 |
<input>"Dear Qagent, your XYZ credit card bill of Rs. 24,500 is due on 15-Jul-2023. Min amount due: Rs. 2,450. Account balance on 3-Jul-2023 is Rs 5,000.Pay now to avoid late fees. - XYZ Bank"</input>
|
|
@@ -107,12 +107,12 @@ text = """
|
|
| 107 |
"overdue_date": "2023-07-15",
|
| 108 |
"collection_team_lead": null,
|
| 109 |
"legal_notice": null,
|
| 110 |
-
"customer_name": "Qagent"
|
|
|
|
| 111 |
}</output>
|
| 112 |
-
|
| 113 |
-
<input>"Dear SBI Cardholder, outstanding of Rs. 9491.00, on your credit card ending 2852 is due on 31-JAN-25. Min. Amount Due: Rs. 475.00. Please ignore if already paid. Click here: https://sbicard.com/quickpaynet to make online payment."</input>
|
| 114 |
<output>
|
| 115 |
-
|
| 116 |
|
| 117 |
# Tokenize input and generate output
|
| 118 |
inputs = tokenizer(text, return_tensors="pt")
|
|
|
|
| 45 |
|
| 46 |
|
| 47 |
# Prepare your input text
|
| 48 |
+
text = '''
|
|
|
|
| 49 |
{
|
| 50 |
"task": "Extract structured information from SMS messages to identify financial details, message purpose, and related information",
|
| 51 |
"instructions": [
|
|
|
|
| 80 |
"key_themes: Extract only 3-5 main themes actually discussed in the SMS as an array of strings - avoid redundant or fabricated themes",
|
| 81 |
"message_type: Categorize as exactly one of: alert message, delayed payment, repayment reminder, auto-pay reminder, refund information, payment failed information, settlement notification by payment aggregator, loan_emi_reminder, emi_confirmation, loan_offer, new_merchant_acquisition, product_offer",
|
| 82 |
"product_type: Identify as one of: credit card, debit card, home loan, vehicle loan, merchant_qr_kit, soundbox (or null if not mentioned)",
|
| 83 |
+
"aggregator_name: Extract payment aggregator name like paytm, phonepe, gpay , bharatpe, one 97 communications (or null if not mentioned). The namees can be written with differen caps lock , inside urls etc. Pay attention and extract it correctly.Do not return bank names in aggregators",
|
| 84 |
"bank_nbfc_fintech_name: Extract the name of the financial institution the message is from (or null if not present). A bank might have aggregator service but dont confuse the bank with aggregator",
|
| 85 |
"emi_amount: Extract only a clearly identified EMI amount as a float number (or null if not mentioned)",
|
| 86 |
"Total_overdue_amount: Extract only a clearly identified total overdue or bill amount as a float (or null if not mentioned)",
|
| 87 |
+
"available_bank_balance: Extract only a clearly identified available bank balance as a float (or null if not mentioned). Do not mention available balance when not given",
|
| 88 |
"min_overdue_amount: Extract only a clearly identified minimum amount due as a float (or null if not mentioned)",
|
| 89 |
"overdue_date: Extract only a clearly identified payment due date as string (or null if not mentioned)",
|
| 90 |
"collection_team_lead: Extract only explicit mentions of collection team involvement (or null if not present)",
|
| 91 |
"legal_notice: Extract only explicit mentions of legal notices (or null if not mentioned)",
|
| 92 |
+
"customer_name: Extract only an explicitly identified customer name (or null if not mentioned)",
|
| 93 |
+
"settlement_amount": Amount credited by the aggregator to the bank account of the merchant/customer,
|
| 94 |
],
|
| 95 |
**example**
|
| 96 |
<input>"Dear Qagent, your XYZ credit card bill of Rs. 24,500 is due on 15-Jul-2023. Min amount due: Rs. 2,450. Account balance on 3-Jul-2023 is Rs 5,000.Pay now to avoid late fees. - XYZ Bank"</input>
|
|
|
|
| 107 |
"overdue_date": "2023-07-15",
|
| 108 |
"collection_team_lead": null,
|
| 109 |
"legal_notice": null,
|
| 110 |
+
"customer_name": "Qagent",
|
| 111 |
+
"settlement_amount":null
|
| 112 |
}</output>
|
| 113 |
+
<input>"{input}"</input>
|
|
|
|
| 114 |
<output>
|
| 115 |
+
'''
|
| 116 |
|
| 117 |
# Tokenize input and generate output
|
| 118 |
inputs = tokenizer(text, return_tensors="pt")
|