This tool is a streamlit based app that uses openai api to extract key financial measures such as company name, stock symbol, revenue, net income etc. from a news article. The news article is typically an article about company's finance reporting.
https://github.com/sumitdas1984/financial_data_extraction_tool.gitPython 3.8 or higher using pyenv.
cd financial_data_extraction_tool
python3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txt- Create a
.envfile in the root directory of the project. - Add your OpenAI and Groq API key in
.envfile.
In commandline run
streamlit run app.pyThis application is containerized using Docker to ensure consistency across different environments and ease of deployment.
- Base Image: We use the official Python image to ensure compatibility with our application.
- Working Directory: The working directory is set to
/appwhere the application code resides. - Dependencies: The application dependencies are installed from
requirements.txt. - Copying Files: The application code and
.envfile are copied into the container. - Exposing Ports: Port 8501 is exposed for accessing the Streamlit application.
- Running the Application: The application is started using Streamlit.
- Docker must be installed on your local machine.
Run the following command to build the Docker image:
docker build -t financial_data_extraction_tool .To run the Docker container, use:
docker run -p 8501:8501 financial_data_extraction_toolOpen your web browser and go to http://localhost:8501 to access the application.
Manage your environment variables using the .env file and the python-dotenv package.
This documentation will help users understand how to use Docker with your application effectively. If you would like to add or modify any specific sections, please let me know!