Skip to main content

Tax Form Service

Overview

The ai-core-tax-form service is developed to facilitate the extraction of data from tax form PDF documents utilizing the cognaize_tax_form Python library. This service is optimized to handle HTTP and WebSocket connections through the aiohttp library, ensuring efficient processing and enabling real-time updates. For a comprehensive understanding oTax Form Service f the cognaize_tax_form package, please refer to the detailed Tax Form Package.

Installation

To install the necessary dependencies, utilize pip in conjunction with the FURY_AUTH authentication token. Execute the following command in your terminal:

FURY_AUTH=${FURY_AUTH} pip install --use-deprecated=legacy-resolver -r requirements.txt

Running the Service Locally

Launching the Server:

Start the server by running:

python app/server.py

[Optional] Monitor Service Progress in Real-Time via WebSocket [Optional]

  • Set the request type to WebSocket
  • Enter the WebSocket URL: ws://localhost:8080/tax-form/ws
  • Click Connect

Uploading PDF File to Process:

  • Open Postman
  • Set the request type to http
  • Set the method to POST
  • Use the URL http://localhost:8080/tax-form
  • Add a key with the type File and name it file
  • Select the PDF file from your computer that you wish to upload
  • Click Send to upload the file and start the Tax Form data extraction process

Viewing the Output:

  • Response Format: The response will appear in JSON with the following format:
{
"result": "formatted_data",
"filename": "uploaded_file.pdf"
}

Where:

  • "result" contains the extracted and formatted data from the PDF.

  • "filename" indicates the name of the uploaded file.

  • WebSocket Updates: If connected via WebSocket, you'll receive real-time updates on the process of extracting Tax Form.