import gradio as gr import subprocess def run_command(cmd): try: if not cmd.strip(): return "⚠️ Please enter a command." output = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, timeout=10) return output.decode("utf-8") except subprocess.CalledProcessError as e: return f"❌ Error:\n{e.output.decode('utf-8')}" except Exception as e: return f"💥 Exception:\n{str(e)}" custom_css = """ #terminal-output textarea { background-color: #000000 !important; color: #00FF00 !important; font-family: monospace !important; font-size: 14px; } #terminal-input textarea { background-color: #111111 !important; color: #00FF00 !important; font-family: monospace !important; font-size: 14px; } #title-heading { color: #00FF00 !important; font-family: monospace !important; font-size: 20px; text-align: center; } """ with gr.Blocks(css=custom_css, title="Termux Styled Terminal") as demo: gr.HTML("