Spaces:
Runtime error
Runtime error
done
Browse files- .gitignore +1 -0
- app.py +3 -3
- requirements.txt +2 -1
.gitignore
CHANGED
|
@@ -11,3 +11,4 @@
|
|
| 11 |
pyvenv.cfg
|
| 12 |
venv
|
| 13 |
pip-selfcheck.json
|
|
|
|
|
|
| 11 |
pyvenv.cfg
|
| 12 |
venv
|
| 13 |
pip-selfcheck.json
|
| 14 |
+
.env
|
app.py
CHANGED
|
@@ -9,7 +9,6 @@ from langchain.agents import AgentType
|
|
| 9 |
from langchain.utilities.zapier import ZapierNLAWrapper
|
| 10 |
import json
|
| 11 |
|
| 12 |
-
|
| 13 |
def main():
|
| 14 |
# Load environment variables
|
| 15 |
load_dotenv(".env")
|
|
@@ -35,7 +34,8 @@ def main():
|
|
| 35 |
|
| 36 |
# Button to execute the agent
|
| 37 |
if st.button("Execute"):
|
| 38 |
-
execute_agent(input_string, llm, toolkit)
|
|
|
|
| 39 |
|
| 40 |
def execute_agent(input_string, llm, toolkit):
|
| 41 |
# Initialize agent
|
|
@@ -44,7 +44,7 @@ def execute_agent(input_string, llm, toolkit):
|
|
| 44 |
)
|
| 45 |
|
| 46 |
# Execute agent
|
| 47 |
-
agent.run(input_string)
|
| 48 |
|
| 49 |
if __name__ == "__main__":
|
| 50 |
main()
|
|
|
|
| 9 |
from langchain.utilities.zapier import ZapierNLAWrapper
|
| 10 |
import json
|
| 11 |
|
|
|
|
| 12 |
def main():
|
| 13 |
# Load environment variables
|
| 14 |
load_dotenv(".env")
|
|
|
|
| 34 |
|
| 35 |
# Button to execute the agent
|
| 36 |
if st.button("Execute"):
|
| 37 |
+
result = execute_agent(input_string, llm, toolkit)
|
| 38 |
+
st.text_area("Output:", value=result, height=None, max_chars=None, key=None)
|
| 39 |
|
| 40 |
def execute_agent(input_string, llm, toolkit):
|
| 41 |
# Initialize agent
|
|
|
|
| 44 |
)
|
| 45 |
|
| 46 |
# Execute agent
|
| 47 |
+
return agent.run(input_string)
|
| 48 |
|
| 49 |
if __name__ == "__main__":
|
| 50 |
main()
|
requirements.txt
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
langchain
|
| 2 |
streamlit
|
| 3 |
python-dotenv
|
| 4 |
-
openai
|
|
|
|
|
|
| 1 |
langchain
|
| 2 |
streamlit
|
| 3 |
python-dotenv
|
| 4 |
+
openai
|
| 5 |
+
watchdog
|