from langchain.tools import ShellTool import gradio as gr shell_tool = ShellTool() def run(commands): return shell_tool.run({"commands": commands}) demo = gr.Interface(fn=run, inputs="text", outputs="text") demo.launch()