Spaces:
Sleeping
Polish UI: labeled controls, depth, live solving feedback
Browse files- Fix the controls bar: container=False was silently discarding the
Model / Max retries / API key labels (Gradio ignores show_label in
that combo), leaving three unlabeled fields. Controls now render with
small-caps labels, with Gradio's inner block chrome stripped by CSS
so they still sit flat in the bar.
- Status bar now flips to a pulsing "Solving with <model>โฆ" pill the
moment Solve/Regenerate is clicked (chained .then() step), instead of
showing "Idle" until the run finishes.
- Visual depth pass: layered shadows on panels/bars, soft radial glow
behind the header, gradient app mark, chip badges (Lean 4 / Mathlib
RAG / LangGraph), focus-within elevation on panels, button focus
rings and press states, halo on panel-title dots.
- Detail work: thin warm scrollbars in code panes and logs, tabular
numerals on the slider, focus glow on inputs, rounded dropdown
popover with shadow, mobile stacking for the editor row,
color-scheme: light to keep HF dark mode from reintroducing
white-on-white.
- Removed the stale two-stage-retry comment block left from the
fast-model removal.
104 unmodified lines10510610710810911011133 unmodified lines1451461471481491501511521531541551561571581591602 unmodified lines1631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152163 unmodified lines22022122222322422522610 unmodified lines2372382392402412422 unmodified lines2452462472482492502512522532542552562572582592602612622632642652662672682692702712726 unmodified lines2792802812822832845 unmodified lines2902912922932942952 unmodified lines2982993003013023033043053063073083093103113123133143153163173186 unmodified lines3253263273283293302 unmodified lines3333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703711 unmodified line3733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164171 unmodified line4194204214224234242 unmodified lines42742842943043143243343443543643743843944044144244344444544644744844945045145245345420 unmodified lines47547647747847948048148248348448548648748848949049149249349449549649725 unmodified lines52352452552652752852917 unmodified lines5475485495505515525532 unmodified lines55655755855956056156256356456556656756856957057157257345 unmodified lines6196206216226236246 unmodified lines631632633634635636637638639640641642104 unmodified linesGROQ_MODELS = ["openai/gpt-oss-120b", # default, strongest open-weight on Groq"openai/gpt-oss-20b", # fast / cheap GPT-OSS (also the fast-tier for two-stage retry)"qwen/qwen3-32b", # Qwen 3, 32B reasoning model"meta-llama/llama-4-scout-17b-16e-instruct", # Llama 4 MoE]33 unmodified lines--accent-soft: #FBE9DF;--ok: #2E7D55;--err: #B85450;}/* Container reset */.gradio-container {background: var(--bg) !important;color: var(--text) !important;font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;max-width: 1400px !important;margin: 0 auto !important;padding: 32px 24px !important;}footer, .show-api { display: none !important; }2 unmodified linesdisplay: flex;align-items: center;justify-content: space-between;margin-bottom: 24px;padding: 0 4px;}#header .title {font-size: 20px;font-weight: 600;letter-spacing: -0.01em;color: var(--text);display: flex;align-items: center;gap: 10px;}#header .title .mark {color: var(--accent);font-size: 22px;}#header .sub {font-size: 13px;color: var(--text-muted);}/* โโโ Top control bar (model + retries) โโโ */#controls {display: flex;align-items: center;gap: 16px;margin-bottom: 16px;padding: 12px 16px;background: var(--panel);border: 1px solid var(--border);border-radius: 10px;}#controls label {font-size: 12px !important;color: var(--text-muted) !important;font-weight: 500 !important;margin: 0 6px 0 0 !important;}#controls .gradio-dropdown,#controls .gradio-slider { margin: 0 !important; }/* โโโ Editor panels โโโ */.panel {background: var(--panel);border: 1px solid var(--border);border-radius: 12px;overflow: hidden;box-shadow: 0 1px 3px rgba(0,0,0,0.02);}.panel-header {display: flex !important;3 unmodified linesbackground: var(--panel-tint) !important;border-bottom: 1px solid var(--border-soft) !important;gap: 8px !important;min-height: 44px;}.panel-title {font-family: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;10 unmodified linesheight: 8px;border-radius: 50%;background: var(--accent);display: inline-block;}.panel-header .panel-actions {2 unmodified linesalign-items: center;}/* โโโ Buttons in panel headers โโโ */.btn button {background: transparent !important;color: var(--text) !important;border: 1px solid var(--border) !important;border-radius: 6px !important;padding: 5px 12px !important;font-size: 12px !important;font-weight: 500 !important;min-width: 0 !important;box-shadow: none !important;transition: all 0.15s ease !important;cursor: pointer;}.btn button:hover {background: var(--panel-tint) !important;border-color: var(--text-muted) !important;}.btn-primary button {background: var(--accent) !important;color: white !important;border: 1px solid var(--accent) !important;}.btn-primary button:hover {background: var(--accent-hover) !important;6 unmodified linesfont-family: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace !important;font-size: 13px !important;line-height: 1.7 !important;}.cm-content { color: var(--text) !important; padding: 12px 0 !important; }.cm-gutters {5 unmodified lines.cm-activeLineGutter { background: var(--panel-tint) !important; color: var(--text) !important; }.cm-cursor { border-left-color: var(--accent) !important; }.cm-selectionBackground { background: var(--accent-soft) !important; }/* Remove the harsh default block borders Gradio puts around gr.Code */.gr-block.gr-code, .gradio-code {2 unmodified lines}/* โโโ Spacing between the two panes โโโ */#editor-row { gap: 16px !important; }/* โโโ Logs accordion โโโ */.gradio-accordion {background: var(--panel) !important;border: 1px solid var(--border) !important;border-radius: 10px !important;margin-top: 16px !important;overflow: hidden;}.gradio-accordion > button {background: var(--panel-tint) !important;color: var(--text-muted) !important;font-size: 12px !important;font-weight: 500 !important;padding: 10px 14px !important;border: none !important;text-align: left !important;6 unmodified linesfont-size: 12px !important;padding: 12px 14px !important;line-height: 1.6 !important;}/* โโโ Status bar โโโ */2 unmodified linesalign-items: center;gap: 12px;margin-top: 16px;padding: 10px 14px;background: var(--panel);border: 1px solid var(--border);border-radius: 10px;font-size: 13px;color: var(--text);}#status-bar .pill {display: inline-flex;align-items: center;padding: 2px 10px;font-size: 11px;font-weight: 600;letter-spacing: 0.4px;text-transform: uppercase;border-radius: 999px;}#status-bar .pill.ok { background: #E8F3EC; color: var(--ok); }#status-bar .pill.err { background: #FBE9E7; color: var(--err); }#status-bar .pill.idle { background: var(--panel-tint); color: var(--text-muted); }/* โโโ Form chrome (dropdown, slider) โโโ */.gradio-dropdown input,.gradio-dropdown .wrap {background: var(--panel) !important;color: var(--text) !important;border: 1px solid var(--border) !important;border-radius: 6px !important;font-size: 13px !important;}.gradio-dropdown input:focus,.gradio-dropdown .wrap:focus-within {border-color: var(--accent) !important;outline: none !important;}input[type="range"] { accent-color: var(--accent) !important; }1 unmodified linecolor: var(--text) !important;font-size: 13px !important;background: var(--panel) !important;}/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโBugfixes (UI v2): force-black text + bounded panel heights so thepage no longer grows vertically with the generated proof, and sowhite-on-white text (dropdown options, code editor selected state,logs textarea) is always readable.โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ *//* Force readable text everywhere in code editors, regardless of theme/state. */.cm-editor,.cm-editor .cm-content,.cm-editor .cm-line,.cm-editor .cm-line span,.cm-editor .cm-content * {color: #1A1A1A !important;}.cm-editor .cm-cursor { border-left-color: var(--accent) !important; }.cm-editor .cm-selectionBackground { background: var(--accent-soft) !important; }/* Logs / textarea outputs โ never white on white. */textarea,.gradio-textbox textarea,.gradio-accordion textarea,input[type="text"],input[type="password"] {color: #1A1A1A !important;background: var(--panel) !important;}::placeholder { color: var(--text-muted) !important; opacity: 1 !important; }/* Dropdown popover (open list of model options) โ main culprit forwhite-on-white. Pin background to white, text to charcoal, and tintthe highlighted/selected row in Claude orange. */ul[role="listbox"],.gradio-dropdown ul,.gradio-dropdown [role="listbox"] {background: #FFFFFF !important;border: 1px solid var(--border) !important;color: #1A1A1A !important;}ul[role="listbox"] li,1 unmodified line.gradio-dropdown [role="option"] {color: #1A1A1A !important;background: #FFFFFF !important;}ul[role="listbox"] li[aria-selected="true"],ul[role="listbox"] li:hover,2 unmodified linesbackground: var(--accent-soft) !important;color: #1A1A1A !important;}/* Bound the editor panels so a long proof scrolls *inside* theminstead of stretching the page. ~520px is roughly 22 lines of codeat our font size + line-height, matching the gr.Code(lines=22) hint. */.panel {max-height: 580px;}.panel .cm-editor {max-height: 520px;overflow: auto;}.panel .cm-scroller {max-height: 520px;overflow: auto !important;}/* Bound the logs accordion (open state) so it doesn't push thestatus bar off-screen for long log runs. */.gradio-accordion textarea {max-height: 240px;overflow: auto !important;}"""20 unmodified linestmp.write(lean_code)tmp.close()# Two-stage retry: for Groq, try the cheap 8b on attempt 0 and# escalate to the user's chosen model on retry. Skip for Claude# (no clear cheap counterpart) and for users who explicitly picked 8b.# Two-stage retry disabled โ every attempt uses the user-selected# model so the proof generation behavior is predictable and matches# what the dropdown shows.fast_model = Nonelean_env, retriever = _get_components()log_buf = io.StringIO()with _capture_stdout(log_buf):agent = LangGraphAgent(model_name=model_name,max_retries=int(max_retries),api_key=api_key,fast_model=fast_model,lean_env=lean_env,retriever=retriever,)25 unmodified linesdef _status_html(kind: str, message: str) -> str:label = {"ok": "Solved", "err": "Failed", "idle": "Idle"}.get(kind, kind)return (f'<div id="status-bar">'f'<span class="pill {kind}">{label}</span>'17 unmodified lines"""<div id="header"><div class="title"><span class="mark">โ</span> Lean 4 Proof Assistant</div><div class="sub">Mathlib RAG ยท Groq ยท LangGraph</div></div>""")2 unmodified lineswith gr.Row(elem_id="controls"):model_dropdown = gr.Dropdown(choices=ALL_MODELS, value=GROQ_MODELS[0],label="Model", show_label=True, container=False, scale=2,)retries_slider = gr.Slider(minimum=1, maximum=10, value=5, step=1,label="Max retries", show_label=True, container=False, scale=1,)anthropic_key_input = gr.Textbox(label="Anthropic API key (only for Claude models)",placeholder="sk-ant-โฆ",type="password",show_label=True,container=False,scale=2,)45 unmodified linesdef _end_run():return Falsedef _warn_on_model_change(running: bool):if running:gr.Warning(6 unmodified lines# โโโ Wiring โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโsolve_btn.click(_start_run, outputs=running_state).then(solve_proof,inputs=[lean_input, model_dropdown, retries_slider, anthropic_key_input],outputs=[status_output, code_output, logs_output],).then(_end_run, outputs=running_state)regen_btn.click(_start_run, outputs=running_state).then(solve_proof,inputs=[lean_input, model_dropdown, retries_slider, anthropic_key_input],outputs=[status_output, code_output, logs_output],104 unmodified lines10510610710810911011133 unmodified lines1451461471481491501511521531541551561571581591601611621631641651662 unmodified lines1691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562573 unmodified lines26126226326426526626710 unmodified lines2782792802812822832842 unmodified lines2872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193206 unmodified lines3273283293303313323333345 unmodified lines3403413423433443453463473483493503513523533543553563573583593603613623633643652 unmodified lines3683693703713723733743753763773783793803813823833843853863873883893903913923936 unmodified lines4004014024034044054064072 unmodified lines4104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644651 unmodified line4674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974981 unmodified line5005015025035045055062 unmodified lines50951051151251351420 unmodified lines53553653753853954054154254354454554654754854955055125 unmodified lines57757857958058158258317 unmodified lines6016026036046056066076086096106112 unmodified lines61461561661761861962062162262362462562662762862945 unmodified lines6756766776786796806816826836 unmodified lines690691692693694695696697698699700701702703704705104 unmodified linesGROQ_MODELS = ["openai/gpt-oss-120b", # default, strongest open-weight on Groq"openai/gpt-oss-20b", # fast / cheap GPT-OSS"qwen/qwen3-32b", # Qwen 3, 32B reasoning model"meta-llama/llama-4-scout-17b-16e-instruct", # Llama 4 MoE]33 unmodified lines--accent-soft: #FBE9DF;--ok: #2E7D55;--err: #B85450;--shadow-sm: 0 1px 2px rgba(26,26,26,0.04), 0 2px 8px rgba(26,26,26,0.04);--shadow-md: 0 2px 4px rgba(26,26,26,0.05), 0 8px 24px rgba(26,26,26,0.07);}/* โโโ Container โโโ */.gradio-container {background-color: var(--bg) !important;/* soft warm glow behind the header, fading into the cream base */background-image: radial-gradient(900px 360px at 50% -120px, #F8E8DD 0%, rgba(248,232,221,0) 70%) !important;background-repeat: no-repeat !important;color: var(--text) !important;color-scheme: light;font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;max-width: 1400px !important;margin: 0 auto !important;padding: 36px 28px 28px !important;}footer, .show-api { display: none !important; }2 unmodified linesdisplay: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;gap: 12px;margin-bottom: 28px;padding: 0 4px;}#header .title {font-size: 22px;font-weight: 650;letter-spacing: -0.02em;color: var(--text);display: flex;align-items: center;gap: 11px;}#header .title .mark {display: inline-flex;align-items: center;justify-content: center;width: 34px;height: 34px;border-radius: 9px;background: linear-gradient(135deg, var(--accent) 0%, #E8946F 100%);color: #fff;font-size: 16px;box-shadow: 0 2px 6px rgba(217,119,87,0.35);}#header .chips { display: flex; gap: 6px; }#header .chip {font-size: 11px;font-weight: 600;letter-spacing: 0.02em;color: var(--text-muted);background: var(--panel);border: 1px solid var(--border);border-radius: 999px;padding: 4px 11px;}/* โโโ Controls bar โโโ */#controls {display: flex;align-items: flex-end;gap: 20px;margin-bottom: 18px;padding: 14px 18px;background: var(--panel);border: 1px solid var(--border);border-radius: 12px;box-shadow: var(--shadow-sm);}/* strip Gradio's inner block chrome so controls sit flat in the bar */#controls .block, #controls .form {background: transparent !important;border: none !important;box-shadow: none !important;padding: 0 !important;margin: 0 !important;}/* component labels โ small caps over each field */#controls span[data-testid="block-info"],#controls label > span:first-child {display: inline-block;font-size: 11px !important;font-weight: 600 !important;text-transform: uppercase;letter-spacing: 0.06em;color: var(--text-muted) !important;margin-bottom: 5px !important;}/* โโโ Editor panels โโโ */.panel {background: var(--panel);border: 1px solid var(--border);border-radius: 14px;overflow: hidden;box-shadow: var(--shadow-sm);transition: box-shadow 0.2s ease, border-color 0.2s ease;max-height: 580px;}.panel:focus-within {box-shadow: var(--shadow-md);border-color: #DCD8CC;}.panel-header {display: flex !important;3 unmodified linesbackground: var(--panel-tint) !important;border-bottom: 1px solid var(--border-soft) !important;gap: 8px !important;min-height: 46px;}.panel-title {font-family: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;10 unmodified linesheight: 8px;border-radius: 50%;background: var(--accent);box-shadow: 0 0 0 3px var(--accent-soft);display: inline-block;}.panel-header .panel-actions {2 unmodified linesalign-items: center;}/* โโโ Buttons โโโ */.btn button {background: var(--panel) !important;color: var(--text) !important;border: 1px solid var(--border) !important;border-radius: 7px !important;padding: 5px 13px !important;font-size: 12px !important;font-weight: 550 !important;min-width: 0 !important;box-shadow: 0 1px 2px rgba(26,26,26,0.04) !important;transition: all 0.15s ease !important;cursor: pointer;}.btn button:hover {background: var(--panel-tint) !important;border-color: #CFCBBE !important;}.btn button:active { transform: translateY(1px); }.btn button:focus-visible {outline: 2px solid var(--accent) !important;outline-offset: 2px !important;}.btn-primary button {background: var(--accent) !important;color: white !important;border: 1px solid var(--accent) !important;box-shadow: 0 1px 3px rgba(217,119,87,0.4) !important;}.btn-primary button:hover {background: var(--accent-hover) !important;6 unmodified linesfont-family: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace !important;font-size: 13px !important;line-height: 1.7 !important;max-height: 520px;overflow: auto;}.cm-content { color: var(--text) !important; padding: 12px 0 !important; }.cm-gutters {5 unmodified lines.cm-activeLineGutter { background: var(--panel-tint) !important; color: var(--text) !important; }.cm-cursor { border-left-color: var(--accent) !important; }.cm-selectionBackground { background: var(--accent-soft) !important; }.cm-scroller { max-height: 520px; overflow: auto !important; }/* readable text in editors regardless of theme/state */.cm-editor, .cm-editor .cm-content, .cm-editor .cm-line,.cm-editor .cm-line span, .cm-editor .cm-content * {color: #1A1A1A !important;}/* thin warm scrollbars in code panes + logs */.cm-scroller::-webkit-scrollbar,.gradio-accordion textarea::-webkit-scrollbar { width: 8px; height: 8px; }.cm-scroller::-webkit-scrollbar-thumb,.gradio-accordion textarea::-webkit-scrollbar-thumb {background: #DDD9CD;border-radius: 4px;}.cm-scroller::-webkit-scrollbar-thumb:hover,.gradio-accordion textarea::-webkit-scrollbar-thumb:hover { background: #C9C5B8; }.cm-scroller::-webkit-scrollbar-track,.gradio-accordion textarea::-webkit-scrollbar-track { background: transparent; }/* Remove the harsh default block borders Gradio puts around gr.Code */.gr-block.gr-code, .gradio-code {2 unmodified lines}/* โโโ Spacing between the two panes โโโ */#editor-row { gap: 18px !important; }@media (max-width: 900px) {#editor-row { flex-direction: column !important; }#controls { flex-wrap: wrap; }}/* โโโ Logs accordion โโโ */.gradio-accordion {background: var(--panel) !important;border: 1px solid var(--border) !important;border-radius: 12px !important;margin-top: 16px !important;overflow: hidden;box-shadow: var(--shadow-sm);}.gradio-accordion > button {background: var(--panel-tint) !important;color: var(--text-muted) !important;font-size: 12px !important;font-weight: 550 !important;padding: 10px 14px !important;border: none !important;text-align: left !important;6 unmodified linesfont-size: 12px !important;padding: 12px 14px !important;line-height: 1.6 !important;max-height: 240px;overflow: auto !important;}/* โโโ Status bar โโโ */2 unmodified linesalign-items: center;gap: 12px;margin-top: 16px;padding: 11px 16px;background: var(--panel);border: 1px solid var(--border);border-radius: 12px;font-size: 13px;color: var(--text);box-shadow: var(--shadow-sm);}#status-bar .pill {display: inline-flex;align-items: center;gap: 6px;padding: 3px 11px;font-size: 11px;font-weight: 650;letter-spacing: 0.04em;text-transform: uppercase;border-radius: 999px;white-space: nowrap;}#status-bar .pill.ok { background: #E8F3EC; color: var(--ok); }#status-bar .pill.err { background: #FBE9E7; color: var(--err); }#status-bar .pill.idle { background: var(--panel-tint); color: var(--text-muted); }#status-bar .pill.run { background: var(--accent-soft); color: var(--accent-hover); }#status-bar .pill.run::before {content: "";width: 6px;height: 6px;border-radius: 50%;background: var(--accent);animation: statpulse 1.2s ease-in-out infinite;}@keyframes statpulse {0%, 100% { opacity: 0.35; transform: scale(0.8); }50% { opacity: 1; transform: scale(1.15); }}/* โโโ Form chrome (dropdown, slider, key field) โโโ */.gradio-dropdown input,.gradio-dropdown .wrap {background: var(--panel) !important;color: var(--text) !important;border: 1px solid var(--border) !important;border-radius: 7px !important;font-size: 13px !important;}.gradio-dropdown input:focus,.gradio-dropdown .wrap:focus-within {border-color: var(--accent) !important;box-shadow: 0 0 0 3px var(--accent-soft) !important;outline: none !important;}input[type="range"] { accent-color: var(--accent) !important; }1 unmodified linecolor: var(--text) !important;font-size: 13px !important;background: var(--panel) !important;font-variant-numeric: tabular-nums;}input[type="password"], input[type="text"] {border-radius: 7px !important;}input[type="password"]:focus, input[type="text"]:focus {border-color: var(--accent) !important;box-shadow: 0 0 0 3px var(--accent-soft) !important;}/* inputs / textareas โ never white on white */textarea, .gradio-textbox textarea, .gradio-accordion textarea,input[type="text"], input[type="password"] {color: #1A1A1A !important;background: var(--panel) !important;}::placeholder { color: var(--text-muted) !important; opacity: 1 !important; }/* dropdown popover โ pinned light so options never go white-on-white */ul[role="listbox"],.gradio-dropdown ul,.gradio-dropdown [role="listbox"] {background: #FFFFFF !important;border: 1px solid var(--border) !important;border-radius: 9px !important;box-shadow: var(--shadow-md) !important;color: #1A1A1A !important;}ul[role="listbox"] li,1 unmodified line.gradio-dropdown [role="option"] {color: #1A1A1A !important;background: #FFFFFF !important;font-size: 13px !important;}ul[role="listbox"] li[aria-selected="true"],ul[role="listbox"] li:hover,2 unmodified linesbackground: var(--accent-soft) !important;color: #1A1A1A !important;}"""20 unmodified linestmp.write(lean_code)tmp.close()lean_env, retriever = _get_components()log_buf = io.StringIO()with _capture_stdout(log_buf):# fast_model=None: two-stage retry is disabled so every attempt# uses the user-selected model and behavior matches the dropdown.agent = LangGraphAgent(model_name=model_name,max_retries=int(max_retries),api_key=api_key,fast_model=None,lean_env=lean_env,retriever=retriever,)25 unmodified linesdef _status_html(kind: str, message: str) -> str:label = {"ok": "Solved", "err": "Failed", "idle": "Idle", "run": "Solving"}.get(kind, kind)return (f'<div id="status-bar">'f'<span class="pill {kind}">{label}</span>'17 unmodified lines"""<div id="header"><div class="title"><span class="mark">โ</span> Lean 4 Proof Assistant</div><div class="chips"><span class="chip">Lean 4</span><span class="chip">Mathlib RAG</span><span class="chip">LangGraph</span></div></div>""")2 unmodified lineswith gr.Row(elem_id="controls"):model_dropdown = gr.Dropdown(choices=ALL_MODELS, value=GROQ_MODELS[0],label="Model", scale=2,)retries_slider = gr.Slider(minimum=1, maximum=10, value=5, step=1,label="Max retries", scale=1,)anthropic_key_input = gr.Textbox(label="Anthropic API key (Claude models only)",placeholder="sk-ant-โฆ",type="password",scale=2,)45 unmodified linesdef _end_run():return Falsedef _show_running(model_name: str):return _status_html("run", f"Solving with {model_name} โ this can take a minuteโฆ")def _warn_on_model_change(running: bool):if running:gr.Warning(6 unmodified lines# โโโ Wiring โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโsolve_btn.click(_start_run, outputs=running_state).then(_show_running, inputs=model_dropdown, outputs=status_output,).then(solve_proof,inputs=[lean_input, model_dropdown, retries_slider, anthropic_key_input],outputs=[status_output, code_output, logs_output],).then(_end_run, outputs=running_state)regen_btn.click(_start_run, outputs=running_state).then(_show_running, inputs=model_dropdown, outputs=status_output,).then(solve_proof,inputs=[lean_input, model_dropdown, retries_slider, anthropic_key_input],outputs=[status_output, code_output, logs_output],