Spaces:
Runtime error
Runtime error
Commit
•
d74ccb5
1
Parent(s):
6f9dbd8
Add application file
Browse files- Dockerfile +0 -9
- app.py +2 -2
Dockerfile
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
FROM public.ecr.aws/lambda/python:3.9
|
2 |
-
|
3 |
-
COPY app.py ${LAMBDA_TASK_ROOT}
|
4 |
-
COPY requirements.txt ./
|
5 |
-
|
6 |
-
RUN pip install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"
|
7 |
-
RUN chmod -R o+rX .
|
8 |
-
|
9 |
-
CMD ["app.lambda_handler"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.py
CHANGED
@@ -4,14 +4,14 @@ from langchain.agents import create_sql_agent
|
|
4 |
from langchain.agents.agent_toolkits import SQLDatabaseToolkit
|
5 |
from langchain.sql_database import SQLDatabase
|
6 |
from langchain.llms.openai import OpenAI
|
7 |
-
|
8 |
import openai
|
9 |
import json
|
10 |
import gradio as gr
|
11 |
import boto3
|
12 |
|
13 |
|
14 |
-
from langchain import OpenAI,
|
15 |
from langchain.agents import AgentType
|
16 |
from langchain.agents.tools import SQLAgent
|
17 |
from langchain.memory import ReadOnlySharedMemory
|
|
|
4 |
from langchain.agents.agent_toolkits import SQLDatabaseToolkit
|
5 |
from langchain.sql_database import SQLDatabase
|
6 |
from langchain.llms.openai import OpenAI
|
7 |
+
from langchain.agents import AgentExecutor
|
8 |
import openai
|
9 |
import json
|
10 |
import gradio as gr
|
11 |
import boto3
|
12 |
|
13 |
|
14 |
+
from langchain import OpenAI, load_tools, initialize_agent
|
15 |
from langchain.agents import AgentType
|
16 |
from langchain.agents.tools import SQLAgent
|
17 |
from langchain.memory import ReadOnlySharedMemory
|