import gradio as gr memory = [] def run_command(cmd): memory.append(f"Executed: {cmd}") return f"✅ Command '{cmd}' received and processed." def recall(): if not memory: return "No prior runs." return "\n".join(memory[-10:]) with gr.Blocks(title="Adaptive Vault – Command Memory System") as demo: gr.Markdown("# 🧠 Adaptive Vault – Command Memory System") cmd = gr.Textbox(label="Command", placeholder="Enter something to learn or run...") out = gr.Textbox(label="Output") mem = gr.Textbox(label="Memory", interactive=False) with gr.Row(): run_btn = gr.Button("Execute") recall_btn = gr.Button("Recall Last") run_btn.click(run_command, inputs=cmd, outputs=out) recall_btn.click(recall, outputs=mem) demo.launch()