Simple web UI frontend that provides answers to free-text questions using SEC filing data as context.
Live demo: https://edgar-ai.streamlit.app/
- Question: What was Microsoft's revenue in fiscal year 2022?
- Sample response: Microsoft's revenue in fiscal year 2022 was $198,270 million.
- Question: How much R&D expense did TSLA have in each quarter of 2019?
- Sample response: The R&D expenses for TSLA in each quarter of 2019 were as follows:
- Q1 2019: $340.2 million
- Q2 2019: $323.9 million
- Q3 2019: $334 million. Please note that these figures are in millions of dollars.
-
Clone this repo
git clone https://github.com/sputnik516/chatWithEDGAR.git
-
Create a new conda env and install all libraries listed in requirements.txt:
conda create -n edgar python=3.11.7 --file requirements.txt
conda activate edgar
-
Install all libraries listed in requirements.txt
-
Create a file
keys.py
, by making a copy ofkeys_sample.py
and renaming it. Set theOPEN_AI_KEY
andKAYAI_API_KEY
to OpenAI and Kay.ai API keys, respectively -
Launch the streamlit server by running:
streamlit run streamlit_app.py
Hint: if running in Pycharm debugger, then set the "Run/Debug Configuration" to:
- Script Name: [path to streamlit executable, get it by running
which streamlit
] - Script Parameters: run streamlit_app.py