From 219c8e9e12ff0618614a0cb600df3a287f2caf27 Mon Sep 17 00:00:00 2001 From: naveenneog Date: Thu, 3 Apr 2025 20:14:02 +0530 Subject: [PATCH 1/3] add virtual environment setup instructions to README --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cf45aad..6e51877 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,32 @@ This application uses Azure Document Intelligence and Azure OpenAI services to a - Azure Document Intelligence service - Azure OpenAI service with GPT-4o deployment +### Virtual Environment Setup + +It is recommended to create a virtual environment for the project: + +**On Windows:** +1. Open a Command Prompt in the project directory. +2. Create a virtual environment using: + ``` + python -m venv venv + ``` +3. Activate the virtual environment: + ``` + venv\Scripts\activate + ``` + +**On macOS/Linux:** +1. Open a Terminal in the project directory. +2. Create a virtual environment using: + ``` + python3 -m venv venv + ``` +3. Activate the virtual environment: + ``` + source venv/bin/activate + ``` + ### Installation Steps 1. Clone the repository 2. Install required dependencies: @@ -48,7 +74,7 @@ This application uses Azure Document Intelligence and Azure OpenAI services to a AZURE_OPENAI_ENDPOINT="https://your-openai-resource.openai.azure.com" ``` - c. Note that `AZURE_OPENAI_API_KEY` should be the same as `OPENAI_KEY` and `AZURE_OPENAI_ENDPOINT` should be the same as `OPENAI_ENDPOINT`. These duplicated variables are needed due to the way the OpenAI library looks for environment variables. + c. Note that `AZURE_OPENAI_API_KEY` should be the same as `OPENAI_KEY` and `AZURE_OPENAI_ENDPOINT` should be the same as `OPENAI_ENDPOINT`. ### Required Files The following files are necessary for running the application: From 22f0a7f7e0fab1441cf0e174ff679423a85a4d8a Mon Sep 17 00:00:00 2001 From: naveenneog Date: Thu, 3 Apr 2025 20:18:04 +0530 Subject: [PATCH 2/3] Updated readme --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e51877..433a01a 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,37 @@ This application uses Azure Document Intelligence and Azure OpenAI services to a - Azure Document Intelligence service - Azure OpenAI service with GPT-4o deployment +#### Poppler Installation (Required for pdf2image) +This project uses the `pdf2image` library which depends on Poppler. Please install it as follows: + +**For Windows:** +1. Download the latest Poppler binary from the [poppler-windows releases](https://github.com/oschwartz10612/poppler-windows/releases). +2. Unzip the downloaded archive to a location under **Program Files** (e.g., `C:\Program Files\poppler`). +3. Add the Poppler `bin` directory (e.g., `C:\Program Files\poppler\poppler-xx\bin`) to your system PATH: + - Press **Win + R**, type `sysdm.cpl`, and press **Enter**. + - Go to the **Advanced** tab and click **Environment Variables**. + - Under **System variables**, select the **Path** variable and click **Edit**. + - Click **New** and add the path to the Poppler `bin` folder. + - Click **OK** to close all dialogs. +4. To verify the installation, open a Command Prompt and run: + ``` + pdftoppm -v + ``` + +**For macOS:** +1. Install Homebrew if it's not already installed. In Terminal, run: + ```bash + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + ``` +2. Install Poppler using Homebrew: + ```bash + brew install poppler + ``` +3. Verify installation by running: + ```bash + pdftoppm -v + ``` + ### Virtual Environment Setup It is recommended to create a virtual environment for the project: @@ -116,5 +147,5 @@ The application will be accessible at http://localhost:5000 in your web browser. ## Troubleshooting - If you encounter environment variable errors, ensure your `.env` file contains all required variables -- For PDF rendering issues, ensure you have the necessary system dependencies for pdf2image +- For PDF rendering issues, ensure you have the necessary system dependencies for pdf2image (see Poppler installation above) - Check application logs for detailed error information From df75af1687843e823a810f915217996aa8e13e34 Mon Sep 17 00:00:00 2001 From: Naveen Gopalakrishna <40742835+naveenneog@users.noreply.github.com> Date: Thu, 3 Apr 2025 20:21:33 +0530 Subject: [PATCH 3/3] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 433a01a..a66daa6 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,10 @@ The application will be accessible at http://localhost:5000 in your web browser. ### Processing Method Selection Dropdown ![Processing Method Selection](static/screens/2.png) +### Results for Handwritten Multilingual tests +![image](https://github.com/user-attachments/assets/845bd41b-4373-4a35-a072-e30d184e212c) + + ## Troubleshooting - If you encounter environment variable errors, ensure your `.env` file contains all required variables - For PDF rendering issues, ensure you have the necessary system dependencies for pdf2image (see Poppler installation above)