Skip to content

martinolsson89/Interpret-Grading-Documents

 
 

Repository files navigation

Grading Document Extraction and Verification System

Installation

Follow these steps to set up and run the project:

  1. Clone the repository
    Open a terminal/command prompt and run:

    git clone <repository-url>
  2. Navigate to the project directory
    Change into the project folder:

    cd <project-directory>
  3. Restore the dependencies
    Use the following command to restore all required packages:

    dotnet restore
  4. Build the project
    Run the build command to compile the project:

    dotnet build

Setup OpenAI API

To use GPT models in this project, you need an OpenAI API key. Follow these steps to obtain and configure the API key:

  1. Create an OpenAI account
    Go to OpenAI's official website and create an account if you don't have one.

  2. 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.

  3. 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:

    Windows:

    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.

    Mac/Linux:

    Open a terminal and add the following to your ~/.bashrc or ~/.zshrc file:

    export OPENAI_API_KEY="<your-openai-api-key>"

    Then run the following command to reload your shell:

    source ~/.bashrc

    (Or replace .bashrc with .zshrc if you’re using ZSH.)

  4. Verify the API key
    Ensure the key is set properly by running:

    echo $OPENAI_API_KEY

    It should display your OpenAI API key.

Running the Project

Once you have completed all the steps above, follow these commands to run the project:

  1. Run the project
    Use this command to start the application:

    dotnet run
  2. Access the Application
    Once the project is running, navigate to http://localhost:7102 in your web browser.

  3. 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.

Troubleshooting

  • 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.

Gallery

qLlj35d

This image shows uploading documents at the home page

NP00aMA

GPT Vision API analyzes the document file to usable data

bgXf3DM

Documents finished analyzing, user can now view information about the submission

Kh2EZkD

Viewing the course requirements and the courses included in calculating average merit value

kjbIUb5

Viewing a individual uploaded document, the analyzed data on the left, and the PDF on the right

Z2Qufrm

Administrator can configure what courses are required for the submission

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 52.5%
  • C# 46.8%
  • Other 0.7%