import gradio as gr from transformers import pipeline model = pipeline("text-generation", model="umarbutler/open-australian-legal-llm") def chatbot(input_text): prompt = "You are an expert in NSW planning law. " + input_text response = model(prompt, max_length=100, num_return_sequences=1) return response[0]['generated_text'] iface = gr.Interface( fn=chatbot, inputs=gr.inputs.Textbox(lines=2, placeholder="Enter your question here..."), outputs="text", title="NSW Planning Law Chatbot", description="Ask questions about NSW planning law." ) iface.launch()