Spaces:
Sleeping
Sleeping
pwilczewski
commited on
Commit
·
2944273
1
Parent(s):
7d3e0da
manual save
Browse files
app.py
CHANGED
@@ -11,6 +11,17 @@ import os
|
|
11 |
df = pd.read_csv("USSTHPI.csv")
|
12 |
python_repl_tool = PythonAstREPLTool(locals={"df": df})
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
# cell 2
|
15 |
from langchain.agents import AgentExecutor, create_openai_tools_agent
|
16 |
from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage
|
|
|
11 |
df = pd.read_csv("USSTHPI.csv")
|
12 |
python_repl_tool = PythonAstREPLTool(locals={"df": df})
|
13 |
|
14 |
+
import matplotlib.pyplot as nplt
|
15 |
+
nplt.figure(figsize=(10, 5))
|
16 |
+
nplt.plot(df['DATE'], df['USSTHPI'], label='USSTHPI')
|
17 |
+
nplt.title('Time Series of USSTHPI')
|
18 |
+
nplt.xlabel('Date')
|
19 |
+
nplt.ylabel('USSTHPI')
|
20 |
+
nplt.legend()
|
21 |
+
nplt.xticks(rotation=45)
|
22 |
+
nplt.tight_layout()
|
23 |
+
nplt.savefig('plots/plot.png')
|
24 |
+
|
25 |
# cell 2
|
26 |
from langchain.agents import AgentExecutor, create_openai_tools_agent
|
27 |
from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage
|