Follow these steps to set up and run the project:
-
Clone the repository
Open a terminal/command prompt and run:git clone <repository-url>
-
Navigate to the project directory
Change into the project folder:cd <project-directory>
-
Restore the dependencies
Use the following command to restore all required packages:dotnet restore
-
Build the project
Run the build command to compile the project:dotnet build
To use GPT models in this project, you need an OpenAI API key. Follow these steps to obtain and configure the API key:
-
Create an OpenAI account
Go to OpenAI's official website and create an account if you don't have one. -
Generate an API key
After logging in, go to your OpenAI API keys page. Click on "Create New Secret Key" to generate a new API key. -
Set the API key in the environment
You need to set the API key in your environment variables. Depending on your operating system, follow one of the following steps:Open a command prompt or PowerShell and run:
setx OPENAI_API_KEY "<your-openai-api-key>"After setting the key, restart your terminal or IDE to ensure the environment variable is loaded.
Open a terminal and add the following to your
~/.bashrcor~/.zshrcfile:export OPENAI_API_KEY="<your-openai-api-key>"
Then run the following command to reload your shell:
source ~/.bashrc
(Or replace
.bashrcwith.zshrcif you’re using ZSH.) -
Verify the API key
Ensure the key is set properly by running:echo $OPENAI_API_KEY
It should display your OpenAI API key.
Once you have completed all the steps above, follow these commands to run the project:
-
Run the project
Use this command to start the application:dotnet run
-
Access the Application
Once the project is running, navigate tohttp://localhost:7102in your web browser. -
Upload and Analyze a Document
You can upload a PDF or image file (JPG, PNG) to the application. The system will extract the information, and you will be able to review and correct any inaccuracies in the extracted data.
- API Key Not Working:
If the GPT service fails to run, ensure that your OpenAI API key is correctly set as an environment variable and that it has sufficient funds on your account.





