- app.py +11 -0
- requirements.txt +3 -0
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from langchain.tools import ShellTool
|
2 |
+
import gradio as gr
|
3 |
+
shell_tool = ShellTool()
|
4 |
+
|
5 |
+
|
6 |
+
def run(commands):
|
7 |
+
return print(shell_tool.run({"commands": commands}))
|
8 |
+
|
9 |
+
demo = gr.Interface(fn=run, inputs="text", outputs="text")
|
10 |
+
|
11 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
langchain==0.0.185
|
2 |
+
gradio==3.32.0
|
3 |
+
psutil==5.9.5
|