diff --git a/README.md b/README.md index e07b0ac..39095fc 100644 --- a/README.md +++ b/README.md @@ -10,26 +10,6 @@ An intelligent and responsible medical app. 2. `pip install git+https://github.com/NLPatVCU/medaCy.git` and `pip install git+https://github.com/NLPatVCU/medaCy_model_clinical_notes.git` . This installs medaCy NER which is built upon Spacy. -3. We use Microsoft Azure's Computer Vision API to extract text (both handwritten and typed). You will require a valid key which you can find in your Microsoft Azure Cognitive Services Account. - -4. Add the key in the file `backend/my_azure_api.py` by setting the value of the variable `_key`. - -# Results - -## Doctor Prescription Parser - - - -![alt_text](https://github.com/Snehal-Reddy/MedAI/blob/master/static/Screenshot%20from%202019-09-12%2022-52-18.png) - -## Interctive Symptom Checker - - -![alt_text](https://github.com/Snehal-Reddy/MedAI/blob/master/static/Screenshot%20from%202019-09-12%2022-23-24.png) -![alt_text](https://github.com/Snehal-Reddy/MedAI/blob/master/static/Screenshot%20from%202019-09-12%2022-27-07.png) -![alt_text](https://github.com/Snehal-Reddy/MedAI/blob/master/static/Screenshot%20from%202019-09-12%2022-27-18.png) - - - - - - +3. We use Google console Computer Vision API to extract text (both handwritten and typed). You will require a valid key which you can find in your Google console Cognitive Services Account. +4. Add the key in the file `backend/my_google_api.py` by setting the value of the variable `_key`. diff --git a/app.py b/app.py index c829fa6..5849406 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,5 @@ from flask import Flask, request, render_template, jsonify -# from backend.my_azure_api import * +# from backend.my_google_api import * from backend.medicine_extractor import * from backend.symptoms import * import json diff --git a/backend/medicine_extractor.py b/backend/medicine_extractor.py index de02c10..08aaa48 100644 --- a/backend/medicine_extractor.py +++ b/backend/medicine_extractor.py @@ -11,8 +11,8 @@ with open('drugs.json', 'r') as f: drugs_dict = json.load(f) -_url = 'https://westcentralus.api.cognitive.microsoft.com/vision/v2.0/RecognizeText' -_key = "38923eb3e1e74daf9ba34045ad1d672d" +_url = 'https://console.cloud.google.com/apis/credentials/oauthclient/498165120842-adem9fcdek3h057uofo4c38damp28d06.apps.googleusercontent.com?project=yashdada' +_key = "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" #Here you have to paste your primary key _maxNumRetries = 10 diff --git a/backend/my_azure_api.py b/backend/my_google_api.py similarity index 95% rename from backend/my_azure_api.py rename to backend/my_google_api.py index c15a129..a937a4d 100644 --- a/backend/my_azure_api.py +++ b/backend/my_google_api.py @@ -6,8 +6,8 @@ import matplotlib.pyplot as plt from matplotlib.lines import Line2D -_url = 'https://westcentralus.api.cognitive.microsoft.com/vision/v2.0/RecognizeText' -_key = "b4f1b6fcb14e447e82dc2aad77d25f76" +_url = 'https://console.cloud.google.com/apis/credentials/oauthclient/498165120842-adem9fcdek3h057uofo4c38damp28d06.apps.googleusercontent.com?project=yashdada' +_key = "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" #Here you have to paste your primary key _maxNumRetries = 10 diff --git a/drugs.json b/drugs.json index 4d16ceb..7ade62f 100644 --- a/drugs.json +++ b/drugs.json @@ -1,6 +1,7 @@ { "description": "A list of pharmaceutical drug names", "source": "The United States National Library of Medicine, http://druginfo.nlm.nih.gov/drugportal/", + "drugs": [ "Abacavir Sulfate", "Abatacept", diff --git a/requirements.txt b/requirements.txt index 5dedd4e..52aa8f4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,63 +1,64 @@ git+https://github.com/NLPatVCU/medaCy.git +git+https://github.com/NLPatVCU/medaCy_model_clinical_notes.git medacy==0.1.1 -attrs==19.1.0 -awscli==1.16.235 -blis==0.2.4 -botocore==1.12.225 -certifi==2019.6.16 -chardet==3.0.4 -Click==7.0 -colorama==0.3.9 -conllu==1.4 +attrs==21.4.0 +awscli==1.22.104 +blis==0.7.4 +botocore==1.21.59 +certifi==2021.10.8 +chardet==4.0.0 +Click==8.0.1 +colorama==0.4.4 +conllu==4.4 cycler==0.10.0 -cymem==2.0.2 -dill==0.3.0 -docutils==0.15.2 -Flask==1.1.1 -idna==2.8 -itsdangerous==1.1.0 -Jinja2==2.10.1 -jmespath==0.9.4 -joblib==0.13.2 -jsonschema==3.0.2 -kiwisolver==1.1.0 -MarkupSafe==1.1.1 -matplotlib==3.1.1 -msgpack==0.5.6 -msgpack-numpy==0.4.3.2 -multiprocess==0.70.8 -murmurhash==1.0.2 -nmslib==1.8.1 -numpy==1.16.1 -opencv-python==4.1.1.26 -pathos==0.2.4 -plac==0.9.6 -pox==0.2.6 -ppft==1.6.6.1 -preshed==2.0.1 -pyasn1==0.4.7 -pybind11==2.3.0 -pyparsing==2.4.2 -pyrsistent==0.15.4 -python-crfsuite==0.9.6 -python-dateutil==2.8.0 -PyYAML==5.1.2 -requests==2.22.0 -rsa==3.4.2 -s3transfer==0.2.1 -scikit-learn==0.21.3 -scipy==1.3.1 -scispacy==0.2.2 -six==1.12.0 +cymem==2.0.5 +dill==0.3.4 +docutils==0.18.1 +Flask==2.1.0 +idna==3.3 +itsdangerous==2.0.1 +Jinja2==3.0.3 +jmespath==0.10.0 +joblib==1.1.0 +jsonschema==4.0.1 +kiwisolver==1.3.2 +MarkupSafe==2.1.0 +matplotlib==3.5.0 +msgpack==1.0.3 +msgpack-numpy==0.4.7.1 +multiprocess==0.70.15 +murmurhash==1.0.5 +nmslib==2.1.1 +numpy==1.21.3 +opencv-python==4.5.4.60 +pathos==0.2.8 +plac==1.3.3 +pox==0.3.0 +ppft==1.6.6.3 +preshed==3.0.5 +pyasn1==0.4.8 +pybind11==2.8.0 +pyparsing==3.0.1 +pyrsistent==0.18.0 +python-crfsuite==0.9.7 +python-dateutil==2.8.2 +PyYAML==6.0 +requests==2.26.0 +rsa==4.7.2 +s3transfer==0.5.0 +scikit-learn==0.24.2 +scipy==1.7.3 +scispacy==0.4.0 +six==1.16.0 sklearn-crfsuite==0.3.6 -spacy==2.1.4 -srsly==0.1.0 -tabulate==0.8.3 -thinc==7.0.8 -tqdm==4.35.0 -urllib3==1.25.3 -wasabi==0.2.2 -Werkzeug==0.15.6 +spacy==3.1.3 +srsly==2.4.1 +tabulate==0.8.9 +thinc==8.0.11 +tqdm==4.62.3 +urllib3==1.26.7 +wasabi==0.8.2 +Werkzeug==2.0.2 xmltodict==0.12.0 -gunicorn==19.9.0 +gunicorn==20.1.0 -r requirements/base.txt \ No newline at end of file diff --git a/requirements/base.txt b/requirements/base.txt index b3dfa1f..e5dda04 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,2 +1,3 @@ git+https://github.com/NLPatVCU/medaCy_model_clinical_notes.git -medacy-model-clinical-notes==1.0.1 \ No newline at end of file +medacy-model-clinical-notes==1.0.1 +install git+https://github.com/NLPatVCU/medaCy_model_clinical_notes.git diff --git a/runtime.txt b/runtime.txt index 8234723..d5831c5 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.6.8 \ No newline at end of file +python-3.11.5 \ No newline at end of file diff --git a/static/prescription.jpg b/static/prescription.jpg deleted file mode 100644 index 84f15a7..0000000 Binary files a/static/prescription.jpg and /dev/null differ