| | --- |
| | license: apache-2.0 |
| | tags: |
| | - finance |
| | - tax |
| | - banking |
| | - investment |
| | - indian-finance |
| | - gst |
| | - conversational |
| | --- |
| | |
| | # π¦ Finxan |
| |
|
| | Finxan is an AI assistant specialized in Indian finance β GST, tax compliance, B2B invoicing, banking, and investments. |
| |
|
| | ## π¬ What Finxan can do |
| |
|
| | - π§Ύ Calculate GST and verify tax compliance |
| | - π¦ Create and manage B2B invoices |
| | - π Answer investment and banking queries |
| | - β
Check financial document compliance |
| | - π€ Answer questions about itself |
| |
|
| | ## π Quick Start |
| | ```python |
| | from peft import PeftModel |
| | from transformers import AutoModelForCausalLM, AutoTokenizer |
| | import torch |
| | |
| | base = AutoModelForCausalLM.from_pretrained( |
| | "mistralai/Mistral-7B-v0.1", |
| | torch_dtype=torch.float16, |
| | device_map="auto" |
| | ) |
| | model = PeftModel.from_pretrained(base, "webdpro/finxan") |
| | tokenizer = AutoTokenizer.from_pretrained("webdpro/finxan") |
| | |
| | def ask_finxan(instruction, input_text=""): |
| | prompt = f"### Instruction:\n{instruction}\n\n### Input:\n{input_text}\n\n### Response:\n" |
| | inputs = tokenizer(prompt, return_tensors="pt").to(model.device) |
| | outputs = model.generate( |
| | **inputs, |
| | max_new_tokens=80, |
| | temperature=0.3, |
| | do_sample=True, |
| | repetition_penalty=1.3, |
| | pad_token_id=tokenizer.eos_token_id |
| | ) |
| | full = tokenizer.decode(outputs[0], skip_special_tokens=True) |
| | return full.split("### Response:")[-1].strip() |
| | |
| | # Try it |
| | print(ask_finxan("What is your name?")) |
| | print(ask_finxan("Calculate GST", "Invoice Rs 50000, GST 18%")) |
| | print(ask_finxan("Who built you?")) |
| | ``` |
| |
|
| | ## π Example Outputs |
| |
|
| | | Question | Answer | |
| | |----------|--------| |
| | | What is your name? | I am Finxan, your AI finance assistant | |
| | | Calculate GST for Rs 50000 at 18% | GST: Rs 9000. Total: Rs 59000 | |
| | | Create a B2B invoice | Invoice created with GST applied | |
| | | Check GST compliance | GST valid. Compliant. | |
| |
|