pwilczewski commited on
Commit
b31f6f5
·
1 Parent(s): 6589e60

added api keys

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -5,6 +5,7 @@ from typing import Annotated
5
  from langchain_experimental.tools import PythonREPLTool, PythonAstREPLTool
6
  import pandas as pd
7
  import statsmodels as sm
 
8
 
9
  # df = pd.read_csv("HOUST.csv")
10
  df = pd.read_csv("USSTHPI.csv")
@@ -65,8 +66,9 @@ def chain_node(state: AgentState, chain, name):
65
  return {"messages": [HumanMessage(content=result.content, name=name)]}
66
 
67
  # cell 3
68
- llm = ChatOpenAI(model="gpt-4o-mini-2024-07-18", temperature=0)
69
- llm_big = ChatOpenAI(model="gpt-4o", temperature=0)
 
70
 
71
  eda_task = """Using the data in the dataframe `df` and the package statsmodels, first run an augmented dickey fuller test on the data.
72
  Using matplotlib plot the time series, display it and save it to 'plot.png'.
 
5
  from langchain_experimental.tools import PythonREPLTool, PythonAstREPLTool
6
  import pandas as pd
7
  import statsmodels as sm
8
+ import os
9
 
10
  # df = pd.read_csv("HOUST.csv")
11
  df = pd.read_csv("USSTHPI.csv")
 
66
  return {"messages": [HumanMessage(content=result.content, name=name)]}
67
 
68
  # cell 3
69
+ OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
70
+ llm = ChatOpenAI(model="gpt-4o-mini-2024-07-18", temperature=0, api_key=OPENAI_API_KEY)
71
+ llm_big = ChatOpenAI(model="gpt-4o", temperature=0, api_key=OPENAI_API_KEY)
72
 
73
  eda_task = """Using the data in the dataframe `df` and the package statsmodels, first run an augmented dickey fuller test on the data.
74
  Using matplotlib plot the time series, display it and save it to 'plot.png'.