|
a/README.md |
|
b/README.md |
1 |
# Healthcare Diagnosis Chatbot |
1 |
# Healthcare Diagnosis Chatbot |
2 |
|
2 |
|
3 |
## Project Overview |
3 |
## Project Overview |
4 |
|
4 |
|
5 |
The Healthcare Chatbot is a Python-based desktop application designed to predict potential diseases based on user-entered symptoms. It leverages natural language processing (NLP) techniques and a pretrained Named Entity Recognition (NER) model from Huggingface to extract disease names from user input. |
5 |
The Healthcare Chatbot is a Python-based desktop application designed to predict potential diseases based on user-entered symptoms. It leverages natural language processing (NLP) techniques and a pretrained Named Entity Recognition (NER) model from Huggingface to extract disease names from user input. |
6 |
|
6 |
|
7 |
## Project Goals |
7 |
## Project Goals |
8 |
|
8 |
|
9 |
The primary goal of this project is to provide users with accurate disease predictions based on their symptoms. By utilizing advanced NLP and machine learning models, the chatbot aims to assist users in understanding potential health issues they may be experiencing. |
9 |
The primary goal of this project is to provide users with accurate disease predictions based on their symptoms. By utilizing advanced NLP and machine learning models, the chatbot aims to assist users in understanding potential health issues they may be experiencing. |
10 |
|
10 |
|
11 |
## Technologies Used |
11 |
## Technologies Used |
12 |
|
12 |
|
13 |
- **Python**: Core programming language used for the application. |
13 |
- **Python**: Core programming language used for the application.
|
14 |
- **TKinter**: Python's standard GUI (Graphical User Interface) toolkit used for creating the desktop-based application. |
14 |
- **TKinter**: Python's standard GUI (Graphical User Interface) toolkit used for creating the desktop-based application.
|
15 |
- **Spacy**: Open-source library for NLP tasks such as tokenization and lemmatization. |
15 |
- **Spacy**: Open-source library for NLP tasks such as tokenization and lemmatization.
|
16 |
- **Huggingface Transformers**: Utilized for accessing a pretrained model (`raynardj/ner-disease-ncbi-bionlp-bc5cdr-pubmed`) to extract disease names from user input. |
16 |
- **Huggingface Transformers**: Utilized for accessing a pretrained model (`raynardj/ner-disease-ncbi-bionlp-bc5cdr-pubmed`) to extract disease names from user input.
|
17 |
- **pip**: Python's package installer used for managing dependencies. |
17 |
- **pip**: Python's package installer used for managing dependencies. |
18 |
|
18 |
|
19 |
## Installation |
19 |
## Installation |
20 |
|
20 |
|
21 |
To run the Healthcare Chatbot locally, follow these steps: |
21 |
To run the Healthcare Chatbot locally, follow these steps: |
22 |
|
22 |
|
23 |
1. **Clone the repository**: |
23 |
1. **Clone the repository**:
|
24 |
``` |
24 |
```
|
25 |
git clone https://github.com/riyajha2305/Healthcare-Diagnosis-Chatbot.git |
25 |
git clone https://github.com/riyajha2305/Healthcare-Diagnosis-Chatbot.git
|
26 |
cd Healthcare-Diagnosis-Chatbot |
26 |
cd Healthcare-Diagnosis-Chatbot
|
27 |
``` |
27 |
```
|
28 |
2. **Install dependencies**: |
28 |
2. **Install dependencies**:
|
29 |
``` |
29 |
```
|
30 |
pip install -r requirements.txt |
30 |
pip install -r requirements.txt
|
31 |
``` |
31 |
```
|
32 |
3. **Download Spacy**: |
32 |
3. **Download Spacy**:
|
33 |
``` |
33 |
```
|
34 |
pip install -U pip setuptools wheel |
34 |
pip install -U pip setuptools wheel
|
35 |
pip install -U spacy |
35 |
pip install -U spacy
|
36 |
python -m spacy download en_core_web_sm |
36 |
python -m spacy download en_core_web_sm
|
37 |
``` |
37 |
```
|
38 |
4. **Download and save pre-trained model from Huggingface as newsave_model** |
38 |
4. **Download and save pre-trained model from Huggingface as newsave_model**
|
39 |
``` |
39 |
```
|
40 |
from transformers import pipeline |
40 |
from transformers import pipeline
|
41 |
PRETRAINED = "raynardj/ner-disease-ncbi-bionlp-bc5cdr-pubmed" |
41 |
PRETRAINED = "raynardj/ner-disease-ncbi-bionlp-bc5cdr-pubmed"
|
42 |
ners = pipeline(task="ner",model=PRETRAINED, tokenizer=PRETRAINED) |
42 |
ners = pipeline(task="ner",model=PRETRAINED, tokenizer=PRETRAINED)
|
43 |
|
43 |
|
44 |
import pickle as pk |
44 |
import pickle as pk
|
45 |
with open('newsave_model', 'wb') as f: |
45 |
with open('newsave_model', 'wb') as f:
|
46 |
pk.dump(ners, f) |
46 |
pk.dump(ners, f)
|
47 |
``` |
47 |
```
|
48 |
## Usage |
48 |
## Usage |
49 |
|
49 |
|
50 |
1. **Run the Application** |
50 |
1. **Run the Application**
|
51 |
``` |
51 |
```
|
52 |
python3 ./HealthCare_App.py |
52 |
python3 ./HealthCare_App.py
|
53 |
``` |
53 |
``` |
54 |
|
54 |
|
55 |
2. **Enter Symptoms** |
55 |
2. **Enter Symptoms**
|
56 |
Use the GUI interface to enter symptoms. The chatbot will predict potential diseases based on the symptoms provided. |
56 |
Use the GUI interface to enter symptoms. The chatbot will predict potential diseases based on the symptoms provided.
|
57 |
Output Image |
57 |
Output Image |
58 |
|
58 |
|
59 |
3. **View results** |
59 |
3. **View results**
|
60 |
The chatbot will display the predicted diseases or health conditions corresponding to the symptoms entered. |
60 |
The chatbot will display the predicted diseases or health conditions corresponding to the symptoms entered. |
61 |
|
61 |
|
62 |
## Application Overview |
62 |
## Application Overview
|
63 |
 |
63 |

|
64 |
 |
64 |

|
65 |
 |
65 |

|
66 |
 |
66 |

|