Spaces:
Sleeping
Sleeping
pgurazada1
commited on
Commit
•
e70ffe8
1
Parent(s):
5e6477e
Complete upgrade to Open AI
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
|
|
4 |
from langchain.agents.agent_types import AgentType
|
5 |
from langchain_experimental.agents.agent_toolkits import create_pandas_dataframe_agent
|
6 |
|
7 |
-
from langchain_openai import
|
8 |
|
9 |
from sklearn.datasets import fetch_openml
|
10 |
|
@@ -14,14 +14,6 @@ gpt35 = ChatOpenAI(
|
|
14 |
temperature=0
|
15 |
)
|
16 |
|
17 |
-
#gpt35 = AzureChatOpenAI(
|
18 |
-
# api_key=os.environ["AZURE_OPENAI_KEY"],
|
19 |
-
# azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
|
20 |
-
# api_version="2023-05-15",
|
21 |
-
# deployment_name="gpt-35-turbo",
|
22 |
-
# temperature=0
|
23 |
-
#)
|
24 |
-
|
25 |
bank_data, _ = fetch_openml(data_id=43718, return_X_y=True, parser="auto")
|
26 |
|
27 |
pandas_agent = create_pandas_dataframe_agent(
|
@@ -79,7 +71,7 @@ interface = gr.Interface(
|
|
79 |
["How many customers have defaulted on loans?", ""],
|
80 |
["Do customers who default maintain a low balance?", ""]
|
81 |
],
|
82 |
-
concurrency_limit=
|
83 |
)
|
84 |
|
85 |
with gr.Blocks() as demo:
|
|
|
4 |
from langchain.agents.agent_types import AgentType
|
5 |
from langchain_experimental.agents.agent_toolkits import create_pandas_dataframe_agent
|
6 |
|
7 |
+
from langchain_openai import ChatOpenAI
|
8 |
|
9 |
from sklearn.datasets import fetch_openml
|
10 |
|
|
|
14 |
temperature=0
|
15 |
)
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
bank_data, _ = fetch_openml(data_id=43718, return_X_y=True, parser="auto")
|
18 |
|
19 |
pandas_agent = create_pandas_dataframe_agent(
|
|
|
71 |
["How many customers have defaulted on loans?", ""],
|
72 |
["Do customers who default maintain a low balance?", ""]
|
73 |
],
|
74 |
+
concurrency_limit=8
|
75 |
)
|
76 |
|
77 |
with gr.Blocks() as demo:
|