import gradio as gr import subprocess import piper def run_command(command): try: # Running the command and capturing the output result = subprocess.run(command, shell=True, text=True, capture_output=True, check=True) return result.stdout except subprocess.CalledProcessError as e: return e.stderr iface = gr.Interface( fn=run_command, inputs='text', outputs='text', title="CLI Interface", description="Enter your command and see the output." ) iface.launch()