Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added portkey analytics and updated README.md #2

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 59 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,60 @@
# 1040-GPT
Let GPT-4 fill your 1040s

## Let GPT-4 Fill Your 1040s

Welcome to our innovative application designed to simplify the tax filing process using the power of GPT-4. With `1040-GPT`, we aim to revolutionize how individuals and businesses complete their tax forms, making it faster, more accurate, and less stressful.

Our application leverages the advanced natural language processing capabilities of GPT-4 to understand and process W2 and 1040 tax forms. Whether you're struggling with tax preparation or just looking for a way to streamline the process, our tool is here to assist. By automating the form-filling process, we minimize errors and maximize efficiency, allowing you to focus on what matters most.

Follow the setup and usage instructions below to get started and experience a hassle-free tax season.

## Getting Started

Follow these steps to set up your environment and run the application.

### Step 1: Install Dependencies

Before running the application, you need to install the required Python packages. Open a terminal and navigate to the root directory of this project. Then run the following command:

``` bash
pip install -r requirements.txt
```

This command reads the `requirements.txt` file and installs the Python packages listed there.

### Step 2: Set Up Environment Variables

You need to configure the required environment variables for the application. Create a `.env` file in the root directory and add your `OPEN_AI_API_KEY` and `PORTKEY_API_KEY` as follows:

``` bash
OPEN_AI_API_KEY=<your_open_ai_api_key>
PORTKEY_API_KEY=<your_portkey_api_key>
```

Replace `<your_open_ai_api_key>` and `<your_portkey_api_key>` with your actual API keys.

### Step 3: Run the Application

To start the application, navigate to the `frontend/` directory and run the following command:

`streamlit run app.py`

This command launches the Streamlit application in your default web browser.

## Using the Application

Once the application is running, follow these steps to process and preview your tax forms:

1. **Upload Forms:** In the web interface that opens, upload your W2 and 1040 forms by clicking on the respective upload buttons.

2. **Process Forms:** After uploading the forms, click on the "Process Forms" button to start the processing. The application will analyze the uploaded documents.

3. **Preview Tax Forms:** Upon successful processing, click on the "Prepare Tax Forms" button to get a preview of the filled form. You can review the information extracted and filled into the form.

## Notes

- Ensure your `.env` file is never shared or committed to a public repository. Include it in your `.gitignore` file to prevent accidental exposure of your API keys.

- If you encounter any issues or need further assistance, please refer to the application documentation or contact support.

Thank you for using our application!
8 changes: 7 additions & 1 deletion backend/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
from openai import OpenAI
from dotenv import load_dotenv
load_dotenv()
client = OpenAI()
client = OpenAI(
base_url="https://api.portkey.ai/v1",
default_headers= {
"x-portkey-provider": "openai",
"Content-Type": "application/json"
}
)
from glob import glob

class Model:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ packaging==23.2
pandas==2.2.0
pdf2image==1.17.0
pillow==10.2.0
portkey_ai==1.1.7
protobuf==4.25.3
pyarrow==15.0.0
pydantic==2.6.1
Expand Down