Skip to content

This repository contains my internship project work at Flexbox Technologies. I have developed a system that fills the patient details form automatically with the patient data extracted from pdf file.

License

Notifications You must be signed in to change notification settings

ShubhRanpara/Auto-Filler-Web

Repository files navigation

ChatPDF

This is a Python project that helps you to read out important details of patients from PDF, PPTx or DOCx file that you have uploaded and it generates the output which helps to fill the form automatically. The project is built using Python, HTML, CSS, JS, and Streamlit framework.

Follow the below instructions to run the application

Installation

  1. First of all we have to create virtual environment to isolate our project dependencies from the system dependencies.
pip install virtualenv
  1. After installing virtualenv library we will create virtual environment named "env".
python3 -m venv env
    or
virtualenv env
  1. Activate "env" using following command.
.\env\Scripts\Activate.ps1
  1. Install important dependencies required for our project using this command.
pip install -r requirements.txt
  1. Add your HUGGINGFACEHUB_API_TOKEN in .env file and check the file name must be .env otherwise rename the file to .env.

  2. Once you have installed the required dependencies, you can run the project using Streamlit. Streamlit provides an easy way to create interactive web applications in Python.

To start the application, run the following command:

python -m streamlit run app.py
    or
streamlit run app.py
  1. After opening the Streamlit web app, you can upload your PDF file and the LLM will generate the answers based on our predefined question set. These answers will be stored in a JSON file.

  2. Then you have to open the related form's HTML file and press the autofill button. This will automatically fill the form by fetching the answers from a JSON file by JavaScript. Please check out for missing values in the form and try to fill it manually.

  3. This was our automatic form filling web app that can help any medical organizatioin to fill the details of the patient in the form. I hope you like the efforts that we have put into this project.

Key errors faced while installation and running of the project :

If any dependency is not working properly than update it with it's latest verson.

If any permission related error occurs than use powershall terminal as administrator and run the command :

Set-ExecutionPolicy unrestricted

If you get AXIOS 403 error, run streamlit app with this command

streamlit run app.py --server.enableXsrfProtection false