import gradio as gr def greet(model_name, prompt_template, name): return f"Hello {name}!! Using model: {model_name} with template: {prompt_template}" model_choices = ["gpt2", "bert-base-uncased", "llama3-8b"] with gr.Blocks() as demo: gr.Markdown("# Instruction Tuning with Unsloth") model_name = gr.Dropdown(label="Model", choices=model_choices, value="gpt2") prompt_template = gr.Textbox(label="Prompt Template", value="Instruction: {0}\nOutput: {1}") name_input = gr.Textbox(label="Your Name") greet_btn = gr.Button("Greet") output = gr.Textbox(label="Output") greet_btn.click(fn=greet, inputs=[model_name, prompt_template, name_input], outputs=output) demo.launch()