| import gradio as gr | |
| from parser import parse | |
| def parse_problem(question:str): | |
| return parse(question).model_dump() | |
| demo = gr.Interface( | |
| fn=parse_problem, | |
| inputs=gr.Textbox( | |
| lines=5, | |
| label="Problem" | |
| ), | |
| outputs=gr.JSON(), | |
| title="Combinatorics Parser", | |
| description="Semantic parser for combinatorics problems." | |
| ) | |
| demo.launch() |