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.
- First of all we have to create virtual environment to isolate our project dependencies from the system dependencies.
pip install virtualenv
- After installing virtualenv library we will create virtual environment named "env".
python3 -m venv env
or
virtualenv env
- Activate "env" using following command.
.\env\Scripts\Activate.ps1
- Install important dependencies required for our project using this command.
pip install -r requirements.txt
-
Add your HUGGINGFACEHUB_API_TOKEN in
.env
file and check the file name must be.env
otherwise rename the file to.env
. -
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
-
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.
-
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.
-
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.
If any permission related error occurs than use powershall terminal as administrator and run the command :
Set-ExecutionPolicy unrestricted
streamlit run app.py --server.enableXsrfProtection false