import gradio as gr from evaluation_logic import run_evaluation, AVAILABLE_PROMPT_FORMATS def gradio_run_evaluation(model_name, prompt_format): return run_evaluation(model_name, prompt_format) with gr.Blocks() as demo: gr.Markdown("# DuckDB SQL Evaluation App") model_name = gr.Textbox(label="Model Name (e.g., qwen/qwen-2.5-72b-instruct)") prompt_format = gr.Dropdown( label="Prompt Format", choices=AVAILABLE_PROMPT_FORMATS, value="duckdbinstgraniteshort" ) start_btn = gr.Button("Start Evaluation") output = gr.Textbox(label="Output", lines=20) start_btn.click(fn=gradio_run_evaluation, inputs=[model_name, prompt_format], outputs=output) demo.queue().launch()