Quantarion / app.py
Aqarion-TB13's picture
Update app.py
3ff49d6 verified
Raw
History Blame Contribute Delete
475 Bytes
import gradio as gr
def run_analysis(base, d):
sizes = basin_analysis(base, d)
out = "Basin Sizes:\n"
for size, c in sizes:
out += f" {size:,} states → Cycle {c[:4]}...\n"
return out
demo = gr.Interface(
fn=run_analysis,
inputs=[gr.Dropdown([8,10,12,16], value=10), gr.Slider(3,7, value=5)],
outputs=gr.Textbox(),
title="Kaprekar Basin Explorer",
description="Live basin sizes + attractors across bases/digits"
)
demo.launch()