File size: 1,105 Bytes
21789cf
 
caff64d
4aa5886
 
 
caff64d
4aa5886
 
 
 
 
caff64d
4aa5886
 
 
caff64d
 
 
 
 
 
 
 
4aa5886
caff64d
 
 
 
 
 
 
4aa5886
caff64d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import gradio as gr

def respond(message, history):
    history = history or []
    history.append({"role": "user", "content": message})

    response = (
        "⚠️ This is a demo of ClaimMore's AI architecture.\n"
        "Not tax advice. For personal tax matters, consult a registered tax agent.\n\n"
        "You asked:\n"
        f"{message}\n\n"
        "This demo shows how ClaimMore uses LLMs + retrieval over public ATO guidance."
    )

    history.append({"role": "assistant", "content": response})
    return history

with gr.Blocks(title="ClaimMore – AI Tax Assistant (Demo)") as demo:
    gr.Markdown("# ClaimMore – AI Tax Assistant")
    gr.Markdown(
        "Ask a **general** Australian tax deduction question "
        "(no personal or financial data)."
    )

    chatbot = gr.Chatbot(type="messages")
    msg = gr.Textbox(
        placeholder="E.g. Can I claim work-from-home expenses in Australia?",
        label="Your question"
    )
    clear = gr.Button("Clear")

    msg.submit(respond, [msg, chatbot], chatbot)
    clear.click(lambda: [], None, chatbot)

demo.launch()