From 901c002ec75e66f7686d1bde07dc5d80e550ebb9 Mon Sep 17 00:00:00 2001 From: sohamghadge Date: Wed, 21 Dec 2022 09:38:46 +0530 Subject: [PATCH 1/3] changes --- .ipynb_checkpoints/botty-checkpoint.ipynb | 6 + botty.ipynb | 361 ++++++++++++++++++++++ 2 files changed, 367 insertions(+) create mode 100644 .ipynb_checkpoints/botty-checkpoint.ipynb create mode 100644 botty.ipynb diff --git a/.ipynb_checkpoints/botty-checkpoint.ipynb b/.ipynb_checkpoints/botty-checkpoint.ipynb new file mode 100644 index 0000000..363fcab --- /dev/null +++ b/.ipynb_checkpoints/botty-checkpoint.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/botty.ipynb b/botty.ipynb new file mode 100644 index 0000000..5f9edf2 --- /dev/null +++ b/botty.ipynb @@ -0,0 +1,361 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "id": "36cf8e1d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.9710628806842597\n", + "for svm: \n", + "1.0\n", + "-----------------------------------HealthCare ChatBot-----------------------------------\n", + "\n", + "Your Name? \t\t\t\t->anand\n", + "Hello, anand\n", + "\n", + "Enter the symptom you are experiencing \t\t->cough\n", + "searches related to input: \n", + "0 ) cough\n", + "Okay. From how many days ? : 90\n", + "Are you experiencing any \n", + "muscle_weakness ? : yes\n", + "stiff_neck ? : yes\n", + "swelling_joints ? : no\n", + "movement_stiffness ? : yes\n", + "painful_walking ? : yes\n", + "You should take the consultation from doctor. \n", + "You may have Arthritis\n", + "Arthritis is the swelling and tenderness of one or more of your joints. The main symptoms of arthritis are joint pain and stiffness, which typically worsen with age. The most common types of arthritis are osteoarthritis and rheumatoid arthritis.\n", + "Take following measures : \n", + "1 ) exercise\n", + "2 ) use hot and cold therapy\n", + "3 ) try acupuncture\n", + "4 ) massage\n", + "----------------------------------------------------------------------------------------\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\soham\\anaconda3\\lib\\site-packages\\sklearn\\base.py:450: UserWarning: X does not have valid feature names, but DecisionTreeClassifier was fitted with feature names\n", + " warnings.warn(\n" + ] + } + ], + "source": [ + "import re\n", + "import pandas as pd\n", + "import pyttsx3\n", + "from sklearn import preprocessing\n", + "from sklearn.tree import DecisionTreeClassifier,_tree\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.model_selection import cross_val_score\n", + "from sklearn.svm import SVC\n", + "import csv\n", + "import warnings\n", + "warnings.filterwarnings(\"ignore\", category=DeprecationWarning)\n", + "\n", + "\n", + "training = pd.read_csv('Data/Training.csv')\n", + "testing= pd.read_csv('Data/Testing.csv')\n", + "cols= training.columns\n", + "cols= cols[:-1]\n", + "x = training[cols]\n", + "y = training['prognosis']\n", + "y1= y\n", + "\n", + "\n", + "reduced_data = training.groupby(training['prognosis']).max()\n", + "\n", + "#mapping strings to numbers\n", + "le = preprocessing.LabelEncoder()\n", + "le.fit(y)\n", + "y = le.transform(y)\n", + "\n", + "\n", + "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.33, random_state=42)\n", + "testx = testing[cols]\n", + "testy = testing['prognosis'] \n", + "testy = le.transform(testy)\n", + "\n", + "\n", + "clf1 = DecisionTreeClassifier()\n", + "clf = clf1.fit(x_train,y_train)\n", + "# print(clf.score(x_train,y_train))\n", + "# print (\"cross result========\")\n", + "scores = cross_val_score(clf, x_test, y_test, cv=3)\n", + "# print (scores)\n", + "print (scores.mean())\n", + "\n", + "\n", + "model=SVC()\n", + "model.fit(x_train,y_train)\n", + "print(\"for svm: \")\n", + "print(model.score(x_test,y_test))\n", + "\n", + "importances = clf.feature_importances_\n", + "indices = np.argsort(importances)[::-1]\n", + "features = cols\n", + "\n", + "def readn(nstr):\n", + " engine = pyttsx3.init()\n", + "\n", + " engine.setProperty('voice', \"english+f5\")\n", + " engine.setProperty('rate', 130)\n", + "\n", + " engine.say(nstr)\n", + " engine.runAndWait()\n", + " engine.stop()\n", + "\n", + "\n", + "severityDictionary=dict()\n", + "description_list = dict()\n", + "precautionDictionary=dict()\n", + "\n", + "symptoms_dict = {}\n", + "\n", + "for index, symptom in enumerate(x):\n", + " symptoms_dict[symptom] = index\n", + "def calc_condition(exp,days):\n", + " sum=0\n", + " for item in exp:\n", + " sum=sum+severityDictionary[item]\n", + " if((sum*days)/(len(exp)+1)>13):\n", + " print(\"You should take the consultation from doctor. \")\n", + " else:\n", + " print(\"It might not be that bad but you should take precautions.\")\n", + "\n", + "\n", + "def getDescription():\n", + " global description_list\n", + " with open('MasterData/symptom_Description.csv') as csv_file:\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " for row in csv_reader:\n", + " _description={row[0]:row[1]}\n", + " description_list.update(_description)\n", + "\n", + "\n", + "\n", + "\n", + "def getSeverityDict():\n", + " global severityDictionary\n", + " with open('MasterData/symptom_severity.csv') as csv_file:\n", + "\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " try:\n", + " for row in csv_reader:\n", + " _diction={row[0]:int(row[1])}\n", + " severityDictionary.update(_diction)\n", + " except:\n", + " pass\n", + "\n", + "\n", + "def getprecautionDict():\n", + " global precautionDictionary\n", + " with open('MasterData/symptom_precaution.csv') as csv_file:\n", + "\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " for row in csv_reader:\n", + " _prec={row[0]:[row[1],row[2],row[3],row[4]]}\n", + " precautionDictionary.update(_prec)\n", + "\n", + "\n", + "def getInfo():\n", + " print(\"-----------------------------------HealthCare ChatBot-----------------------------------\")\n", + " print(\"\\nYour Name? \\t\\t\\t\\t\",end=\"->\")\n", + " name=input(\"\")\n", + " print(\"Hello, \",name)\n", + "\n", + "def check_pattern(dis_list,inp):\n", + " pred_list=[]\n", + " inp=inp.replace(' ','_')\n", + " patt = f\"{inp}\"\n", + " regexp = re.compile(patt)\n", + " pred_list=[item for item in dis_list if regexp.search(item)]\n", + " if(len(pred_list)>0):\n", + " return 1,pred_list\n", + " else:\n", + " return 0,[]\n", + "def sec_predict(symptoms_exp):\n", + " df = pd.read_csv('Data/Training.csv')\n", + " X = df.iloc[:, :-1]\n", + " y = df['prognosis']\n", + " X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=20)\n", + " rf_clf = DecisionTreeClassifier()\n", + " rf_clf.fit(X_train, y_train)\n", + "\n", + " symptoms_dict = {symptom: index for index, symptom in enumerate(X)}\n", + " input_vector = np.zeros(len(symptoms_dict))\n", + " for item in symptoms_exp:\n", + " input_vector[[symptoms_dict[item]]] = 1\n", + "\n", + " return rf_clf.predict([input_vector])\n", + "\n", + "\n", + "def print_disease(node):\n", + " node = node[0]\n", + " val = node.nonzero() \n", + " disease = le.inverse_transform(val[0])\n", + " return list(map(lambda x:x.strip(),list(disease)))\n", + "\n", + "def tree_to_code(tree, feature_names):\n", + " tree_ = tree.tree_\n", + " feature_name = [\n", + " feature_names[i] if i != _tree.TREE_UNDEFINED else \"undefined!\"\n", + " for i in tree_.feature\n", + " ]\n", + "\n", + " chk_dis=\",\".join(feature_names).split(\",\")\n", + " symptoms_present = []\n", + "\n", + " while True:\n", + "\n", + " print(\"\\nEnter the symptom you are experiencing \\t\\t\",end=\"->\")\n", + " disease_input = input(\"\")\n", + " conf,cnf_dis=check_pattern(chk_dis,disease_input)\n", + " if conf==1:\n", + " print(\"searches related to input: \")\n", + " for num,it in enumerate(cnf_dis):\n", + " print(num,\")\",it)\n", + " if num!=0:\n", + " print(f\"Select the one you meant (0 - {num}): \", end=\"\")\n", + " conf_inp = int(input(\"\"))\n", + " else:\n", + " conf_inp=0\n", + "\n", + " disease_input=cnf_dis[conf_inp]\n", + " break\n", + " # print(\"Did you mean: \",cnf_dis,\"?(yes/no) :\",end=\"\")\n", + " # conf_inp = input(\"\")\n", + " # if(conf_inp==\"yes\"):\n", + " # break\n", + " else:\n", + " print(\"Enter valid symptom.\")\n", + "\n", + " while True:\n", + " try:\n", + " num_days=int(input(\"Okay. From how many days ? : \"))\n", + " break\n", + " except:\n", + " print(\"Enter valid input.\")\n", + " def recurse(node, depth):\n", + " indent = \" \" * depth\n", + " if tree_.feature[node] != _tree.TREE_UNDEFINED:\n", + " name = feature_name[node]\n", + " threshold = tree_.threshold[node]\n", + "\n", + " if name == disease_input:\n", + " val = 1\n", + " else:\n", + " val = 0\n", + " if val <= threshold:\n", + " recurse(tree_.children_left[node], depth + 1)\n", + " else:\n", + " symptoms_present.append(name)\n", + " recurse(tree_.children_right[node], depth + 1)\n", + " else:\n", + " present_disease = print_disease(tree_.value[node])\n", + " # print( \"You may have \" + present_disease )\n", + " red_cols = reduced_data.columns \n", + " symptoms_given = red_cols[reduced_data.loc[present_disease].values[0].nonzero()]\n", + " # dis_list=list(symptoms_present)\n", + " # if len(dis_list)!=0:\n", + " # print(\"symptoms present \" + str(list(symptoms_present)))\n", + " # print(\"symptoms given \" + str(list(symptoms_given)) )\n", + " print(\"Are you experiencing any \")\n", + " symptoms_exp=[]\n", + " for syms in list(symptoms_given):\n", + " inp=\"\"\n", + " print(syms,\"? : \",end='')\n", + " while True:\n", + " inp=input(\"\")\n", + " if(inp==\"yes\" or inp==\"no\"):\n", + " break\n", + " else:\n", + " print(\"provide proper answers i.e. (yes/no) : \",end=\"\")\n", + " if(inp==\"yes\"):\n", + " symptoms_exp.append(syms)\n", + "\n", + " second_prediction=sec_predict(symptoms_exp)\n", + " # print(second_prediction)\n", + " calc_condition(symptoms_exp,num_days)\n", + " if(present_disease[0]==second_prediction[0]):\n", + " print(\"You may have \", present_disease[0])\n", + " print(description_list[present_disease[0]])\n", + "\n", + " # readn(f\"You may have {present_disease[0]}\")\n", + " # readn(f\"{description_list[present_disease[0]]}\")\n", + "\n", + " else:\n", + " print(\"You may have \", present_disease[0], \"or \", second_prediction[0])\n", + " print(description_list[present_disease[0]])\n", + " print(description_list[second_prediction[0]])\n", + "\n", + " # print(description_list[present_disease[0]])\n", + " precution_list=precautionDictionary[present_disease[0]]\n", + " print(\"Take following measures : \")\n", + " for i,j in enumerate(precution_list):\n", + " print(i+1,\")\",j)\n", + "\n", + " # confidence_level = (1.0*len(symptoms_present))/len(symptoms_given)\n", + " # print(\"confidence level is \" + str(confidence_level))\n", + "\n", + " recurse(0, 1)\n", + "getSeverityDict()\n", + "getDescription()\n", + "getprecautionDict()\n", + "getInfo()\n", + "tree_to_code(clf,cols)\n", + "print(\"----------------------------------------------------------------------------------------\")\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "33356b87", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ef5690a3", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.15" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 75447ad5eac2ddb2cc08fde6d42ea650bb959514 Mon Sep 17 00:00:00 2001 From: sohamghadge Date: Mon, 13 Mar 2023 20:08:31 +0530 Subject: [PATCH 2/3] 13/3 --- .ipynb_checkpoints/Untitled-checkpoint.ipynb | 6 + .ipynb_checkpoints/gui-checkpoint.ipynb | 94 ++++++++ Untitled.ipynb | 49 ++++ bg.png | Bin 0 -> 28827 bytes botty.ipynb | 229 ++++++++++++++++--- gui.ipynb | 57 +++++ hello.py | 13 ++ 7 files changed, 421 insertions(+), 27 deletions(-) create mode 100644 .ipynb_checkpoints/Untitled-checkpoint.ipynb create mode 100644 .ipynb_checkpoints/gui-checkpoint.ipynb create mode 100644 Untitled.ipynb create mode 100644 bg.png create mode 100644 gui.ipynb create mode 100644 hello.py diff --git a/.ipynb_checkpoints/Untitled-checkpoint.ipynb b/.ipynb_checkpoints/Untitled-checkpoint.ipynb new file mode 100644 index 0000000..363fcab --- /dev/null +++ b/.ipynb_checkpoints/Untitled-checkpoint.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/.ipynb_checkpoints/gui-checkpoint.ipynb b/.ipynb_checkpoints/gui-checkpoint.ipynb new file mode 100644 index 0000000..3bc3ffc --- /dev/null +++ b/.ipynb_checkpoints/gui-checkpoint.ipynb @@ -0,0 +1,94 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 14, + "id": "bf26f4c7", + "metadata": {}, + "outputs": [ + { + "ename": "TclError", + "evalue": "image \"pyimage12\" doesn't exist", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mTclError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[1;32mIn[14], line 11\u001b[0m\n\u001b[0;32m 9\u001b[0m img2\u001b[38;5;241m=\u001b[39mImageTk\u001b[38;5;241m.\u001b[39mPhotoImage(img1)\n\u001b[0;32m 10\u001b[0m label1\u001b[38;5;241m=\u001b[39mLabel(app)\n\u001b[1;32m---> 11\u001b[0m \u001b[43mlabel1\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mconfig\u001b[49m\u001b[43m(\u001b[49m\u001b[43mimage\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mimg2\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 12\u001b[0m label1\u001b[38;5;241m.\u001b[39mplace(x\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m0\u001b[39m,y\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m0\u001b[39m)\n\u001b[0;32m 13\u001b[0m text \u001b[38;5;241m=\u001b[39mMessage(app, text\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mHello I am A.I.D.A. your personal healthcare assistant. How can I assist you today?\u001b[39m\u001b[38;5;124m\"\u001b[39m, bg\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mred\u001b[39m\u001b[38;5;124m\"\u001b[39m, fg\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mwhite\u001b[39m\u001b[38;5;124m\"\u001b[39m, width \u001b[38;5;241m=\u001b[39m\u001b[38;5;241m300\u001b[39m)\n", + "File \u001b[1;32m~\\anaconda3\\envs\\healthbot\\lib\\tkinter\\__init__.py:1675\u001b[0m, in \u001b[0;36mMisc.configure\u001b[1;34m(self, cnf, **kw)\u001b[0m\n\u001b[0;32m 1668\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mconfigure\u001b[39m(\u001b[38;5;28mself\u001b[39m, cnf\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkw):\n\u001b[0;32m 1669\u001b[0m \u001b[38;5;124;03m\"\"\"Configure resources of a widget.\u001b[39;00m\n\u001b[0;32m 1670\u001b[0m \n\u001b[0;32m 1671\u001b[0m \u001b[38;5;124;03m The values for resources are specified as keyword\u001b[39;00m\n\u001b[0;32m 1672\u001b[0m \u001b[38;5;124;03m arguments. To get an overview about\u001b[39;00m\n\u001b[0;32m 1673\u001b[0m \u001b[38;5;124;03m the allowed keyword arguments call the method keys.\u001b[39;00m\n\u001b[0;32m 1674\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m-> 1675\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_configure\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mconfigure\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcnf\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkw\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32m~\\anaconda3\\envs\\healthbot\\lib\\tkinter\\__init__.py:1665\u001b[0m, in \u001b[0;36mMisc._configure\u001b[1;34m(self, cmd, cnf, kw)\u001b[0m\n\u001b[0;32m 1663\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(cnf, \u001b[38;5;28mstr\u001b[39m):\n\u001b[0;32m 1664\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_getconfigure1(_flatten((\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_w, cmd, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m-\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;241m+\u001b[39mcnf)))\n\u001b[1;32m-> 1665\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtk\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcall\u001b[49m\u001b[43m(\u001b[49m\u001b[43m_flatten\u001b[49m\u001b[43m(\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_w\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcmd\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m+\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_options\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcnf\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", + "\u001b[1;31mTclError\u001b[0m: image \"pyimage12\" doesn't exist" + ] + } + ], + "source": [ + "from tkinter import *\n", + "from customtkinter import *\n", + "from PIL import ImageTk,Image\n", + "app = Tk()\n", + "app.config(bg=\"#000080\")\n", + "app.title(\"A.I.D.A.\")\n", + "app.geometry(\"492x700\")\n", + "img1=Image.open(\"bg.png\")\n", + "img2=ImageTk.PhotoImage(img1)\n", + "label1=Label(app)\n", + "label1.config(image=img2)\n", + "label1.place(x=0,y=0)\n", + "text =Message(app, text=\"Hello I am A.I.D.A. your personal healthcare assistant. How can I assist you today?\", bg=\"red\", fg=\"white\", width =300)\n", + "# Showing the label\n", + "#text.pack()\n", + "text.place(x=5,y=10) \n", + "box=Text(app,width=36, height=4, padx=5, pady=5)\n", + "box.place(x=0,y=610)\n", + "sendbtn=Button(app, text=\"Send\", bg=\"black\", fg=\"white\", width=10,height=4)\n", + "sendbtn.place(x=300,y=610)\n", + "# Runnig an event loop\n", + "app.mainloop()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9b8b4ffd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2752da7b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e4486e2b", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/Untitled.ipynb b/Untitled.ipynb new file mode 100644 index 0000000..bcde553 --- /dev/null +++ b/Untitled.ipynb @@ -0,0 +1,49 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "e523bd1d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "736403af", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "34e20e73", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/bg.png b/bg.png new file mode 100644 index 0000000000000000000000000000000000000000..dd5ed2e519e8749ca64f404792fab100070ca74d GIT binary patch literal 28827 zcmX`SWmp_fusw{syL)i=5Zv8e7k5}Z1b1091cC((ZVLoYfW;vM0t9yrF2Vhs-~HeF ze&Atuwx_zgYPzTDoYM)~no8Ih6c})DaM&u!^15(v@X2s+2tsHmz!mnna(&<*I#}7n z2M!LC;J-ik>DACDI5;{u6?qx`_xZ;^(6h}AzTCdntWB>TXgVGZL<>6Oq5D!1>d{9g z9$;Z`gGvasFR0NG!@PDvVpBHWHH?d@Pz{qiB5ggPQt8Cm4cOBOFoiR2d`w{|`bw9s zA{QC!k;~*je=srq_)l_u`7cph%~@Tif!}AJiRX}lih{N3np26k)BA$;4+N#9r31X> zA63gp2&eQfjNRU8+&{`5FqBxdzOKFrozGNf4!A%~>^`a~3^c#&oUHIKMl zvL^iOf3W~G=pqsoj%7mwT2TJi0$DsaMtOYx9K#8oy) z13iu|(;-&3>8dckvj%fU9R?L)zk0Yrlnx4hSh#4d?!XTsA+V=AF+-mhfg-xGVD<>! z1sWSc4OSadVwo9QJQ02hgg3pn1Qwl$hrvd`5qO2^kVk}1g2${5H14%7Mxz2g3;y>R zFXC9}_yY#^LEq9qgfBCzu^^chz9DjSiNcJpv7WT)nIb)%TL^DAtORx!IT9SHZ9dFc zO_fJamme{B2MOM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/botty.ipynb index 5f9edf2..b7d8220 100644 --- a/botty.ipynb +++ b/botty.ipynb @@ -10,32 +10,37 @@ "name": "stdout", "output_type": "stream", "text": [ - "0.9710628806842597\n", + "0.9759840666798535\n", "for svm: \n", "1.0\n", "-----------------------------------HealthCare ChatBot-----------------------------------\n", "\n", - "Your Name? \t\t\t\t->anand\n", - "Hello, anand\n", + "Your Name? \t\t\t\t->soham\n", + "Hello, soham\n", "\n", - "Enter the symptom you are experiencing \t\t->cough\n", + "Enter the symptom you are experiencing \t\t->no\n", "searches related to input: \n", - "0 ) cough\n", - "Okay. From how many days ? : 90\n", + "0 ) nodal_skin_eruptions\n", + "1 ) swelled_lymph_nodes\n", + "2 ) runny_nose\n", + "3 ) abnormal_menstruation\n", + "4 ) red_sore_around_nose\n", + "Select the one you meant (0 - 4): 0\n", + "Okay. From how many days ? : 0\n", "Are you experiencing any \n", - "muscle_weakness ? : yes\n", - "stiff_neck ? : yes\n", - "swelling_joints ? : no\n", - "movement_stiffness ? : yes\n", - "painful_walking ? : yes\n", - "You should take the consultation from doctor. \n", - "You may have Arthritis\n", - "Arthritis is the swelling and tenderness of one or more of your joints. The main symptoms of arthritis are joint pain and stiffness, which typically worsen with age. The most common types of arthritis are osteoarthritis and rheumatoid arthritis.\n", + "itching ? : no\n", + "skin_rash ? : no\n", + "nodal_skin_eruptions ? : no\n", + "dischromic _patches ? : no\n", + "It might not be that bad but you should take precautions.\n", + "You may have Fungal infection or Impetigo\n", + "In humans, fungal infections occur when an invading fungus takes over an area of the body and is too much for the immune system to handle. Fungi can live in the air, soil, water, and plants. There are also some fungi that live naturally in the human body. Like many microbes, there are helpful fungi and harmful fungi.\n", + "Impetigo (im-puh-TIE-go) is a common and highly contagious skin infection that mainly affects infants and children. Impetigo usually appears as red sores on the face, especially around a child's nose and mouth, and on hands and feet. The sores burst and develop honey-colored crusts.\n", "Take following measures : \n", - "1 ) exercise\n", - "2 ) use hot and cold therapy\n", - "3 ) try acupuncture\n", - "4 ) massage\n", + "1 ) bath twice\n", + "2 ) use detol or neem in bathing water\n", + "3 ) keep infected area dry\n", + "4 ) use clean cloths\n", "----------------------------------------------------------------------------------------\n" ] }, @@ -43,7 +48,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "C:\\Users\\soham\\anaconda3\\lib\\site-packages\\sklearn\\base.py:450: UserWarning: X does not have valid feature names, but DecisionTreeClassifier was fitted with feature names\n", + "C:\\Users\\soham\\anaconda3\\envs\\healthbot\\lib\\site-packages\\sklearn\\base.py:439: UserWarning: X does not have valid feature names, but DecisionTreeClassifier was fitted with feature names\n", " warnings.warn(\n" ] } @@ -60,6 +65,9 @@ "from sklearn.svm import SVC\n", "import csv\n", "import warnings\n", + "from tkinter import *\n", + "from customtkinter import *\n", + "from PIL import ImageTk,Image\n", "warnings.filterwarnings(\"ignore\", category=DeprecationWarning)\n", "\n", "\n", @@ -170,11 +178,11 @@ " precautionDictionary.update(_prec)\n", "\n", "\n", - "def getInfo():\n", + "\"\"\"def getInfo():\n", " print(\"-----------------------------------HealthCare ChatBot-----------------------------------\")\n", " print(\"\\nYour Name? \\t\\t\\t\\t\",end=\"->\")\n", " name=input(\"\")\n", - " print(\"Hello, \",name)\n", + " print(\"Hello, \",name)\"\"\"\n", "\n", "def check_pattern(dis_list,inp):\n", " pred_list=[]\n", @@ -217,6 +225,10 @@ "\n", " chk_dis=\",\".join(feature_names).split(\",\")\n", " symptoms_present = []\n", + " print(\"-----------------------------------HealthCare ChatBot-----------------------------------\")\n", + " print(\"\\nYour Name? \\t\\t\\t\\t\",end=\"->\")\n", + " name=input(\"\")\n", + " print(\"Hello, \",name)\n", "\n", " while True:\n", "\n", @@ -314,23 +326,186 @@ "getSeverityDict()\n", "getDescription()\n", "getprecautionDict()\n", - "getInfo()\n", + "#getInfo()\n", "tree_to_code(clf,cols)\n", "print(\"----------------------------------------------------------------------------------------\")\n", + "\n", "\n" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "33356b87", "metadata": {}, - "outputs": [], - "source": [] + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-----------------------------------HealthCare ChatBot-----------------------------------\n", + "\n", + "Your Name? \t\t\t\t->soham\n", + "Hello, soham\n", + "\n", + "Enter the symptom you are experiencing \t\t->n\n", + "searches related to input: \n", + "0 ) itching\n", + "1 ) skin_rash\n", + "2 ) nodal_skin_eruptions\n", + "3 ) continuous_sneezing\n", + "4 ) shivering\n", + "5 ) joint_pain\n", + "6 ) stomach_pain\n", + "7 ) ulcers_on_tongue\n", + "8 ) muscle_wasting\n", + "9 ) vomiting\n", + "10 ) burning_micturition\n", + "11 ) spotting_ urination\n", + "12 ) weight_gain\n", + "13 ) anxiety\n", + "14 ) cold_hands_and_feets\n", + "15 ) mood_swings\n", + "16 ) restlessness\n", + "17 ) patches_in_throat\n", + "18 ) sunken_eyes\n", + "19 ) breathlessness\n", + "20 ) sweating\n", + "21 ) dehydration\n", + "22 ) indigestion\n", + "23 ) yellowish_skin\n", + "24 ) dark_urine\n", + "25 ) nausea\n", + "26 ) pain_behind_the_eyes\n", + "27 ) back_pain\n", + "28 ) constipation\n", + "29 ) abdominal_pain\n", + "30 ) yellow_urine\n", + "31 ) yellowing_of_eyes\n", + "32 ) swelling_of_stomach\n", + "33 ) swelled_lymph_nodes\n", + "34 ) blurred_and_distorted_vision\n", + "35 ) throat_irritation\n", + "36 ) redness_of_eyes\n", + "37 ) sinus_pressure\n", + "38 ) runny_nose\n", + "39 ) congestion\n", + "40 ) chest_pain\n", + "41 ) weakness_in_limbs\n", + "42 ) pain_during_bowel_movements\n", + "43 ) pain_in_anal_region\n", + "44 ) irritation_in_anus\n", + "45 ) neck_pain\n", + "46 ) dizziness\n", + "47 ) bruising\n", + "48 ) swollen_legs\n", + "49 ) swollen_blood_vessels\n", + "50 ) puffy_face_and_eyes\n", + "51 ) enlarged_thyroid\n", + "52 ) brittle_nails\n", + "53 ) swollen_extremeties\n", + "54 ) excessive_hunger\n", + "55 ) extra_marital_contacts\n", + "56 ) drying_and_tingling_lips\n", + "57 ) knee_pain\n", + "58 ) hip_joint_pain\n", + "59 ) muscle_weakness\n", + "60 ) stiff_neck\n", + "61 ) swelling_joints\n", + "62 ) movement_stiffness\n", + "63 ) spinning_movements\n", + "64 ) loss_of_balance\n", + "65 ) unsteadiness\n", + "66 ) weakness_of_one_body_side\n", + "67 ) foul_smell_of urine\n", + "68 ) continuous_feel_of_urine\n", + "69 ) internal_itching\n", + "70 ) depression\n", + "71 ) muscle_pain\n", + "72 ) altered_sensorium\n", + "73 ) belly_pain\n", + "74 ) abnormal_menstruation\n", + "75 ) watering_from_eyes\n", + "76 ) increased_appetite\n", + "77 ) lack_of_concentration\n", + "78 ) visual_disturbances\n", + "79 ) receiving_blood_transfusion\n", + "80 ) receiving_unsterile_injections\n", + "81 ) stomach_bleeding\n", + "82 ) distention_of_abdomen\n", + "83 ) history_of_alcohol_consumption\n", + "84 ) blood_in_sputum\n", + "85 ) prominent_veins_on_calf\n", + "86 ) palpitations\n", + "87 ) painful_walking\n", + "88 ) scurring\n", + "89 ) skin_peeling\n", + "90 ) silver_like_dusting\n", + "91 ) small_dents_in_nails\n", + "92 ) inflammatory_nails\n", + "93 ) red_sore_around_nose\n", + "Select the one you meant (0 - 93): 0\n", + "Okay. From how many days ? : 0\n", + "Are you experiencing any \n", + "itching ? : no0\n", + "provide proper answers i.e. (yes/no) : no\n", + "skin_rash ? : no\n", + "stomach_pain ? : no\n", + "burning_micturition ? : no\n", + "spotting_ urination ? : no\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\soham\\anaconda3\\envs\\healthbot\\lib\\site-packages\\sklearn\\base.py:439: UserWarning: X does not have valid feature names, but DecisionTreeClassifier was fitted with feature names\n", + " warnings.warn(\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "It might not be that bad but you should take precautions.\n", + "You may have Drug Reaction or Peptic ulcer diseae\n", + "An adverse drug reaction (ADR) is an injury caused by taking medication. ADRs may occur following a single dose or prolonged administration of a drug or result from the combination of two or more drugs.\n", + "Peptic ulcer disease (PUD) is a break in the inner lining of the stomach, the first part of the small intestine, or sometimes the lower esophagus. An ulcer in the stomach is called a gastric ulcer, while one in the first part of the intestines is a duodenal ulcer.\n", + "Take following measures : \n", + "1 ) stop irritation\n", + "2 ) consult nearest hospital\n", + "3 ) stop taking drug\n", + "4 ) follow up\n" + ] + } + ], + "source": [ + "###################################### GUI ####################################################\n", + "\n", + "app = Tk()\n", + "app.config(bg=\"#000080\")\n", + "app.title(\"A.I.D.A.\")\n", + "app.geometry(\"400x700\")\n", + "img1=Image.open(\"bg.png\")\n", + "img2=ImageTk.PhotoImage(img1)\n", + "label1=Label(app)\n", + "#label1.config(image=img2)\n", + "label1.place(x=0,y=0)\n", + "text =Message(app, text=\"Hello I am A.I.D.A. your personal healthcare assistant. Please enter your name so that I can personally assist you!\", bg=\"red\", fg=\"white\", width =300)\n", + "# Showing the label\n", + "#text.pack()\n", + "text.place(x=5,y=10) \n", + "box=Text(app,width=38, height=4, padx=5, pady=5)\n", + "box.place(x=0,y=570)\n", + "sendbtn=Button(app, text=\"Send\", bg=\"black\", fg=\"white\", width=11,height=4, command=tree_to_code(clf,cols))\n", + "sendbtn.place(x=320,y=570)\n", + "# Running an event loop\n", + "app.mainloop()\n" + ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 0, "id": "ef5690a3", "metadata": {}, "outputs": [], @@ -353,7 +528,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.15" + "version": "3.10.9" } }, "nbformat": 4, diff --git a/gui.ipynb b/gui.ipynb new file mode 100644 index 0000000..1bec182 --- /dev/null +++ b/gui.ipynb @@ -0,0 +1,57 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "id": "bf26f4c7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9b8b4ffd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2752da7b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e4486e2b", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/hello.py b/hello.py new file mode 100644 index 0000000..37d463c --- /dev/null +++ b/hello.py @@ -0,0 +1,13 @@ +import sys +from PyQt6.QtWidgets import QApplication, QLabel, QWidget +app=QApplication([]) +window = QWidget() +window.setWindowTitle("PyQt App") +window.setGeometry(100, 100, 280, 80) +helloMsg = QLabel("

Hello, World!

", parent=window) +helloMsg.move(60, 15) +# 4. Show your application's GUI +window.show() + +# 5. Run your application's event loop +sys.exit(app.exec()) From 8d47a363798ffc7475b10530da4b2ce2f19fd29a Mon Sep 17 00:00:00 2001 From: sohamghadge Date: Sat, 1 Apr 2023 18:46:19 +0530 Subject: [PATCH 3/3] Svg --- .ipynb_checkpoints/Untitled-checkpoint.ipynb | 6 - .ipynb_checkpoints/botty-checkpoint.ipynb | 1394 +++++++++++- .ipynb_checkpoints/gui-checkpoint.ipynb | 94 - Untitled.ipynb | 49 - botty.ipynb | 2089 ++++++++++++++++-- gui.ipynb | 57 - hello.py | 13 - templates/index.html | 43 + 8 files changed, 3311 insertions(+), 434 deletions(-) delete mode 100644 .ipynb_checkpoints/Untitled-checkpoint.ipynb delete mode 100644 .ipynb_checkpoints/gui-checkpoint.ipynb delete mode 100644 Untitled.ipynb delete mode 100644 gui.ipynb delete mode 100644 hello.py create mode 100644 templates/index.html diff --git a/.ipynb_checkpoints/Untitled-checkpoint.ipynb b/.ipynb_checkpoints/Untitled-checkpoint.ipynb deleted file mode 100644 index 363fcab..0000000 --- a/.ipynb_checkpoints/Untitled-checkpoint.ipynb +++ /dev/null @@ -1,6 +0,0 @@ -{ - "cells": [], - "metadata": {}, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/.ipynb_checkpoints/botty-checkpoint.ipynb b/.ipynb_checkpoints/botty-checkpoint.ipynb index 363fcab..ff5d78a 100644 --- a/.ipynb_checkpoints/botty-checkpoint.ipynb +++ b/.ipynb_checkpoints/botty-checkpoint.ipynb @@ -1,6 +1,1396 @@ { - "cells": [], - "metadata": {}, + "cells": [ + { + "cell_type": "code", + "execution_count": 4, + "id": "36cf8e1d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.9747551911748323\n", + "for svm: \n", + "1.0\n", + "-----------------------------------HealthCare ChatBot-----------------------------------\n", + "\n", + "Your Name? \t\t\t\t->soham\n", + "Hello, .!ctkentry\n" + ] + }, + { + "ename": "TypeError", + "evalue": "can only concatenate str (not \"CTkEntry\") to str", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[1;32mIn[4], line 303\u001b[0m\n\u001b[0;32m 301\u001b[0m getprecautionDict()\n\u001b[0;32m 302\u001b[0m \u001b[38;5;66;03m#getInfo()\u001b[39;00m\n\u001b[1;32m--> 303\u001b[0m \u001b[43mtree_to_code\u001b[49m\u001b[43m(\u001b[49m\u001b[43mclf\u001b[49m\u001b[43m,\u001b[49m\u001b[43mcols\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 304\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m----------------------------------------------------------------------------------------\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m 305\u001b[0m root\u001b[38;5;241m.\u001b[39mmainloop()\n", + "Cell \u001b[1;32mIn[4], line 189\u001b[0m, in \u001b[0;36mtree_to_code\u001b[1;34m(tree, feature_names)\u001b[0m\n\u001b[0;32m 187\u001b[0m name\u001b[38;5;241m.\u001b[39mpack()\n\u001b[0;32m 188\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mHello, \u001b[39m\u001b[38;5;124m\"\u001b[39m,name)\n\u001b[1;32m--> 189\u001b[0m CTkLabel(root,text\u001b[38;5;241m=\u001b[39m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mHello, \u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;241;43m+\u001b[39;49m\u001b[43mname\u001b[49m)\u001b[38;5;241m.\u001b[39mpack()\n\u001b[0;32m 191\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[0;32m 193\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124mEnter the symptom you are experiencing \u001b[39m\u001b[38;5;130;01m\\t\u001b[39;00m\u001b[38;5;130;01m\\t\u001b[39;00m\u001b[38;5;124m\"\u001b[39m,end\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m->\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", + "\u001b[1;31mTypeError\u001b[0m: can only concatenate str (not \"CTkEntry\") to str" + ] + } + ], + "source": [ + "import re\n", + "import pandas as pd\n", + "import pyttsx3\n", + "from sklearn import preprocessing\n", + "from sklearn.tree import DecisionTreeClassifier,_tree\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.model_selection import cross_val_score\n", + "from sklearn.svm import SVC\n", + "import csv\n", + "import warnings\n", + "from tkinter import *\n", + "from customtkinter import *\n", + "from PIL import ImageTk,Image\n", + "warnings.filterwarnings(\"ignore\", category=DeprecationWarning)\n", + "\n", + "\n", + "root=CTk()\n", + "root.geometry(\"400x700\")\n", + "root.title(\"A.I.D.A.\")\n", + "CTkLabel(root,text=\"Hello I am AIDA!!\").pack()\n", + "# root.mainloop()\n", + "\n", + "\n", + "\n", + "\n", + "training = pd.read_csv('Data/Training.csv')\n", + "testing= pd.read_csv('Data/Testing.csv')\n", + "cols= training.columns\n", + "cols= cols[:-1]\n", + "x = training[cols]\n", + "y = training['prognosis']\n", + "y1= y\n", + "\n", + "\n", + "reduced_data = training.groupby(training['prognosis']).max()\n", + "\n", + "#mapping strings to numbers\n", + "le = preprocessing.LabelEncoder()\n", + "le.fit(y)\n", + "y = le.transform(y)\n", + "\n", + "\n", + "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.33, random_state=42)\n", + "testx = testing[cols]\n", + "testy = testing['prognosis'] \n", + "testy = le.transform(testy)\n", + "\n", + "\n", + "clf1 = DecisionTreeClassifier()\n", + "clf = clf1.fit(x_train,y_train)\n", + "# print(clf.score(x_train,y_train))\n", + "# print (\"cross result========\")\n", + "scores = cross_val_score(clf, x_test, y_test, cv=3)\n", + "# print (scores)\n", + "print (scores.mean())\n", + "\n", + "\n", + "model=SVC()\n", + "model.fit(x_train,y_train)\n", + "print(\"for svm: \")\n", + "print(model.score(x_test,y_test))\n", + "\n", + "importances = clf.feature_importances_\n", + "indices = np.argsort(importances)[::-1]\n", + "features = cols\n", + "\n", + "def readn(nstr):\n", + " engine = pyttsx3.init()\n", + "\n", + " engine.setProperty('voice', \"english+f5\")\n", + " engine.setProperty('rate', 130)\n", + "\n", + " engine.say(nstr)\n", + " engine.runAndWait()\n", + " engine.stop()\n", + "\n", + "\n", + "severityDictionary=dict()\n", + "description_list = dict()\n", + "precautionDictionary=dict()\n", + "\n", + "symptoms_dict = {}\n", + "\n", + "for index, symptom in enumerate(x):\n", + " symptoms_dict[symptom] = index\n", + "def calc_condition(exp,days):\n", + " sum=0\n", + " for item in exp:\n", + " sum=sum+severityDictionary[item]\n", + " if((sum*days)/(len(exp)+1)>13):\n", + " print(\"You should take the consultation from doctor. \")\n", + " CTkLabel(root,text=\"You should take the consultation from doctor. \").pack()\n", + " else:\n", + " print(\"It might not be that bad but you should take precautions.\")\n", + " CTkLabel(root,text=\"It might not be that bad but you should take precautions.\").pack()\n", + "\n", + "\n", + "def getDescription():\n", + " global description_list\n", + " with open('MasterData/symptom_Description.csv') as csv_file:\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " for row in csv_reader:\n", + " _description={row[0]:row[1]}\n", + " description_list.update(_description)\n", + "\n", + "\n", + "\n", + "\n", + "def getSeverityDict():\n", + " global severityDictionary\n", + " with open('MasterData/symptom_severity.csv') as csv_file:\n", + "\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " try:\n", + " for row in csv_reader:\n", + " _diction={row[0]:int(row[1])}\n", + " severityDictionary.update(_diction)\n", + " except:\n", + " pass\n", + "\n", + "\n", + "def getprecautionDict():\n", + " global precautionDictionary\n", + " with open('MasterData/symptom_precaution.csv') as csv_file:\n", + "\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " for row in csv_reader:\n", + " _prec={row[0]:[row[1],row[2],row[3],row[4]]}\n", + " precautionDictionary.update(_prec)\n", + "\n", + "\n", + "\"\"\"def getInfo():\n", + " print(\"-----------------------------------HealthCare ChatBot-----------------------------------\")\n", + " print(\"\\nYour Name? \\t\\t\\t\\t\",end=\"->\")\n", + " name=input(\"\")\n", + " print(\"Hello, \",name)\"\"\"\n", + "\n", + "def check_pattern(dis_list,inp):\n", + " pred_list=[]\n", + " inp=inp.replace(' ','_')\n", + " patt = f\"{inp}\"\n", + " regexp = re.compile(patt)\n", + " pred_list=[item for item in dis_list if regexp.search(item)]\n", + " if(len(pred_list)>0):\n", + " return 1,pred_list\n", + " else:\n", + " return 0,[]\n", + "def sec_predict(symptoms_exp):\n", + " df = pd.read_csv('Data/Training.csv')\n", + " X = df.iloc[:, :-1]\n", + " y = df['prognosis']\n", + " X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=20)\n", + " rf_clf = DecisionTreeClassifier()\n", + " rf_clf.fit(X_train, y_train)\n", + "\n", + " symptoms_dict = {symptom: index for index, symptom in enumerate(X)}\n", + " input_vector = np.zeros(len(symptoms_dict))\n", + " for item in symptoms_exp:\n", + " input_vector[[symptoms_dict[item]]] = 1\n", + "\n", + " return rf_clf.predict([input_vector])\n", + "\n", + "\n", + "def print_disease(node):\n", + " node = node[0]\n", + " val = node.nonzero() \n", + " disease = le.inverse_transform(val[0])\n", + " return list(map(lambda x:x.strip(),list(disease)))\n", + "\n", + "def tree_to_code(tree, feature_names):\n", + " tree_ = tree.tree_\n", + " feature_name = [\n", + " feature_names[i] if i != _tree.TREE_UNDEFINED else \"undefined!\"\n", + " for i in tree_.feature\n", + " ]\n", + "\n", + " chk_dis=\",\".join(feature_names).split(\",\")\n", + " symptoms_present = []\n", + " print(\"-----------------------------------HealthCare ChatBot-----------------------------------\")\n", + " print(\"\\nYour Name? \\t\\t\\t\\t\",end=\"->\")\n", + " name=input(\"\")\n", + " print(\"Hello, \",name)\n", + "\n", + " while True:\n", + "\n", + " print(\"\\nEnter the symptom you are experiencing \\t\\t\",end=\"->\")\n", + " CTkLabel(root,text=\"Enter the symptom you are experiencing\").pack()\n", + " disease_input = input(\"\")\n", + " conf,cnf_dis=check_pattern(chk_dis,disease_input)\n", + " if conf==1:\n", + " print(\"searches related to input: \")\n", + " for num,it in enumerate(cnf_dis):\n", + " print(num,\")\",it)\n", + " if num!=0:\n", + " print(f\"Select the one you meant (0 - {num}): \", end=\"\")\n", + " conf_inp = int(input(\"\"))\n", + " else:\n", + " conf_inp=0\n", + "\n", + " disease_input=cnf_dis[conf_inp]\n", + " break\n", + " # print(\"Did you mean: \",cnf_dis,\"?(yes/no) :\",end=\"\")\n", + " # conf_inp = input(\"\")\n", + " # if(conf_inp==\"yes\"):\n", + " # break\n", + " else:\n", + " print(\"Enter valid symptom.\")\n", + "\n", + " while True:\n", + " try:\n", + " CTkLabel(root,text=\"Okay. From how many days ? : \").pack()\n", + " num_days=int(input(\"Okay. From how many days ? : \"))\n", + " break\n", + " except:\n", + " print(\"Enter valid input.\")\n", + " CTkLabel(root,text=\"Enter valid input. \").pack()\n", + " def recurse(node, depth):\n", + " indent = \" \" * depth\n", + " if tree_.feature[node] != _tree.TREE_UNDEFINED:\n", + " name = feature_name[node]\n", + " threshold = tree_.threshold[node]\n", + "\n", + " if name == disease_input:\n", + " val = 1\n", + " else:\n", + " val = 0\n", + " if val <= threshold:\n", + " recurse(tree_.children_left[node], depth + 1)\n", + " else:\n", + " symptoms_present.append(name)\n", + " recurse(tree_.children_right[node], depth + 1)\n", + " else:\n", + " present_disease = print_disease(tree_.value[node])\n", + " # print( \"You may have \" + present_disease )\n", + " red_cols = reduced_data.columns \n", + " symptoms_given = red_cols[reduced_data.loc[present_disease].values[0].nonzero()]\n", + " # dis_list=list(symptoms_present)\n", + " # if len(dis_list)!=0:\n", + " # print(\"symptoms present \" + str(list(symptoms_present)))\n", + " # print(\"symptoms given \" + str(list(symptoms_given)) )\n", + " print(\"Are you experiencing any \")\n", + " CTkLabel(root,text=\"Are you experiencing any \").pack()\n", + " symptoms_exp=[]\n", + " for syms in list(symptoms_given):\n", + " inp=\"\"\n", + " print(syms,\"? : \",end='')\n", + " CTkLabel(root,text=syms).pack()\n", + " while True:\n", + " inp=input(\"\")\n", + " if(inp==\"yes\" or inp==\"no\"):\n", + " break\n", + " else:\n", + " print(\"provide proper answers i.e. (yes/no) : \",end=\"\")\n", + " CTkLabel(root,text=\"provide proper answers i.e. (yes/no) : \").pack()\n", + " if(inp==\"yes\"):\n", + " symptoms_exp.append(syms)\n", + "\n", + " second_prediction=sec_predict(symptoms_exp)\n", + " # print(second_prediction)\n", + " calc_condition(symptoms_exp,num_days)\n", + " if(present_disease[0]==second_prediction[0]):\n", + " print(\"You may have \", present_disease[0])\n", + " CTkLabel(root, text=\"You may have \" + present_disease[0]).pack()\n", + " print(description_list[present_disease[0]])\n", + " CTkLabel(root,text=description_list[present_disease[0]]).pack()\n", + "\n", + " # readn(f\"You may have {present_disease[0]}\")\n", + " # readn(f\"{description_list[present_disease[0]]}\")\n", + "\n", + " else:\n", + " print(\"You may have \", present_disease[0], \"or \", second_prediction[0])\n", + " CTkLabel(root, text=\"You may have \" + present_disease[0] + \" or \" + second_prediction[0]).pack()\n", + " print(description_list[present_disease[0]])\n", + " CTkLabel(root,text=description_list[present_disease[0]]).pack()\n", + " print(description_list[second_prediction[0]])\n", + " CTkLabel(root,text=description_list[second_prediction[0]]).pack()\n", + "\n", + " # print(description_list[present_disease[0]])\n", + " precution_list=precautionDictionary[present_disease[0]]\n", + " print(\"Take following measures : \")\n", + " CTkLabel(root,text=\"Take following measures : \").pack()\n", + " for i,j in enumerate(precution_list):\n", + " print(i+1,\")\",j)\n", + " CTkLabel(root, text=str(i+1) + \")\" + j).pack()\n", + "\n", + " # confidence_level = (1.0*len(symptoms_present))/len(symptoms_given)\n", + " # print(\"confidence level is \" + str(confidence_level))\n", + "\n", + " recurse(0, 1)\n", + "getSeverityDict()\n", + "getDescription()\n", + "getprecautionDict()\n", + "#getInfo()\n", + "tree_to_code(clf,cols)\n", + "print(\"----------------------------------------------------------------------------------------\")\n", + "root.mainloop()\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "33356b87", + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ef5690a3", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f2d9076c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8da9b836", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "692fc2bd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6df23640", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "73656cd0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "99b80946", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "22915c77", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "99f4268c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "26bd4243", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b8536727", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "040a5238", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "057b703f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3c5cb9b7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "17ff2ef0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0413475c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "11108558", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8b89387c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f26c8793", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d9ae7758", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f982b6ce", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c5a59435", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6016454c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cfdb314f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f33128a5", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4e929f29", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bb0d24c1", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e3a79bef", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "56490227", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8e5d2abd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a907f0e5", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9076896e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "50497f6f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "17003184", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "31a63d8f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f4e2e464", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ca3d4e43", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b49ab223", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ed61f368", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "81229a84", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "696b07b9", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "47e87abb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fa51a573", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "565866d0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "40bd7b20", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5f066347", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1db54f9e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "eeda3dfd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "09c9a00e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "04e8d95b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "038a446c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "abda2d7c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e24ae74b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "13923adb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3d747318", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e72165ec", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b15dec7b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dd89d4aa", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f972bb8e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1af5105f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "88f01100", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0df9375a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9966a474", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "69306d0e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "caba5c9d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1754a8fe", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6c3f56f0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3a3f372e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9ebb9c25", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "055efe1a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "86867f78", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "63b607b1", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "77c442bb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b65e9a90", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "15c8f1a7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e91f9264", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cdcbb7e3", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "307aa1e7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b0358205", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6dc329a8", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0ef3301d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "678d62d0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "90b07348", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9b0bd16b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4344bf97", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b70d6471", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d54b1c77", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "52d7450c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "16a710cb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "56cf61fd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "69924d0e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "41b9883f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "aff0f483", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "65ef9f4a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bc2d99a9", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "38198973", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7d16d1a7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5e7e055b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "86f1c86a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d8c3fb0c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "49fbca4e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "076037fb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3f4f884e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "837ebbd2", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2938bc4c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f9dc8a82", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "693eda76", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2a5ed572", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3074f79b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c4c557e0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c08557e8", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "86498931", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9d06f490", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2c6ce44c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "666e89f4", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "781fbbf0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dd4a6186", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "30b8d70d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0da7dc5a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ca01a51d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8bc5e502", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d400bfac", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e0713b39", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e22e5aa0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e510d538", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c5d076cd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0ac2d344", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "83de60d6", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.9" + } + }, "nbformat": 4, "nbformat_minor": 5 } diff --git a/.ipynb_checkpoints/gui-checkpoint.ipynb b/.ipynb_checkpoints/gui-checkpoint.ipynb deleted file mode 100644 index 3bc3ffc..0000000 --- a/.ipynb_checkpoints/gui-checkpoint.ipynb +++ /dev/null @@ -1,94 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 14, - "id": "bf26f4c7", - "metadata": {}, - "outputs": [ - { - "ename": "TclError", - "evalue": "image \"pyimage12\" doesn't exist", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mTclError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[1;32mIn[14], line 11\u001b[0m\n\u001b[0;32m 9\u001b[0m img2\u001b[38;5;241m=\u001b[39mImageTk\u001b[38;5;241m.\u001b[39mPhotoImage(img1)\n\u001b[0;32m 10\u001b[0m label1\u001b[38;5;241m=\u001b[39mLabel(app)\n\u001b[1;32m---> 11\u001b[0m \u001b[43mlabel1\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mconfig\u001b[49m\u001b[43m(\u001b[49m\u001b[43mimage\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mimg2\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 12\u001b[0m label1\u001b[38;5;241m.\u001b[39mplace(x\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m0\u001b[39m,y\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m0\u001b[39m)\n\u001b[0;32m 13\u001b[0m text \u001b[38;5;241m=\u001b[39mMessage(app, text\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mHello I am A.I.D.A. your personal healthcare assistant. How can I assist you today?\u001b[39m\u001b[38;5;124m\"\u001b[39m, bg\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mred\u001b[39m\u001b[38;5;124m\"\u001b[39m, fg\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mwhite\u001b[39m\u001b[38;5;124m\"\u001b[39m, width \u001b[38;5;241m=\u001b[39m\u001b[38;5;241m300\u001b[39m)\n", - "File \u001b[1;32m~\\anaconda3\\envs\\healthbot\\lib\\tkinter\\__init__.py:1675\u001b[0m, in \u001b[0;36mMisc.configure\u001b[1;34m(self, cnf, **kw)\u001b[0m\n\u001b[0;32m 1668\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mconfigure\u001b[39m(\u001b[38;5;28mself\u001b[39m, cnf\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkw):\n\u001b[0;32m 1669\u001b[0m \u001b[38;5;124;03m\"\"\"Configure resources of a widget.\u001b[39;00m\n\u001b[0;32m 1670\u001b[0m \n\u001b[0;32m 1671\u001b[0m \u001b[38;5;124;03m The values for resources are specified as keyword\u001b[39;00m\n\u001b[0;32m 1672\u001b[0m \u001b[38;5;124;03m arguments. To get an overview about\u001b[39;00m\n\u001b[0;32m 1673\u001b[0m \u001b[38;5;124;03m the allowed keyword arguments call the method keys.\u001b[39;00m\n\u001b[0;32m 1674\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m-> 1675\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_configure\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mconfigure\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcnf\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkw\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[1;32m~\\anaconda3\\envs\\healthbot\\lib\\tkinter\\__init__.py:1665\u001b[0m, in \u001b[0;36mMisc._configure\u001b[1;34m(self, cmd, cnf, kw)\u001b[0m\n\u001b[0;32m 1663\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(cnf, \u001b[38;5;28mstr\u001b[39m):\n\u001b[0;32m 1664\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_getconfigure1(_flatten((\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_w, cmd, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m-\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;241m+\u001b[39mcnf)))\n\u001b[1;32m-> 1665\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtk\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcall\u001b[49m\u001b[43m(\u001b[49m\u001b[43m_flatten\u001b[49m\u001b[43m(\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_w\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcmd\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m+\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_options\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcnf\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", - "\u001b[1;31mTclError\u001b[0m: image \"pyimage12\" doesn't exist" - ] - } - ], - "source": [ - "from tkinter import *\n", - "from customtkinter import *\n", - "from PIL import ImageTk,Image\n", - "app = Tk()\n", - "app.config(bg=\"#000080\")\n", - "app.title(\"A.I.D.A.\")\n", - "app.geometry(\"492x700\")\n", - "img1=Image.open(\"bg.png\")\n", - "img2=ImageTk.PhotoImage(img1)\n", - "label1=Label(app)\n", - "label1.config(image=img2)\n", - "label1.place(x=0,y=0)\n", - "text =Message(app, text=\"Hello I am A.I.D.A. your personal healthcare assistant. How can I assist you today?\", bg=\"red\", fg=\"white\", width =300)\n", - "# Showing the label\n", - "#text.pack()\n", - "text.place(x=5,y=10) \n", - "box=Text(app,width=36, height=4, padx=5, pady=5)\n", - "box.place(x=0,y=610)\n", - "sendbtn=Button(app, text=\"Send\", bg=\"black\", fg=\"white\", width=10,height=4)\n", - "sendbtn.place(x=300,y=610)\n", - "# Runnig an event loop\n", - "app.mainloop()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9b8b4ffd", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2752da7b", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e4486e2b", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/Untitled.ipynb b/Untitled.ipynb deleted file mode 100644 index bcde553..0000000 --- a/Untitled.ipynb +++ /dev/null @@ -1,49 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "e523bd1d", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "736403af", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "34e20e73", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/botty.ipynb b/botty.ipynb index b7d8220..c427097 100644 --- a/botty.ipynb +++ b/botty.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "36cf8e1d", "metadata": {}, "outputs": [ @@ -10,38 +10,26 @@ "name": "stdout", "output_type": "stream", "text": [ - "0.9759840666798535\n", + "0.9741413218198726\n", "for svm: \n", "1.0\n", "-----------------------------------HealthCare ChatBot-----------------------------------\n", "\n", - "Your Name? \t\t\t\t->soham\n", - "Hello, soham\n", + "Your Name? \t\t\t\t->Soham\n", + "Hello, Soham\n", "\n", - "Enter the symptom you are experiencing \t\t->no\n", + "Enter the symptom you are experiencing \t\t->fever\n", "searches related to input: \n", - "0 ) nodal_skin_eruptions\n", - "1 ) swelled_lymph_nodes\n", - "2 ) runny_nose\n", - "3 ) abnormal_menstruation\n", - "4 ) red_sore_around_nose\n", - "Select the one you meant (0 - 4): 0\n", - "Okay. From how many days ? : 0\n", + "0 ) high_fever\n", + "1 ) mild_fever\n", + "Select the one you meant (0 - 1): 0\n", + "Okay. From how many days ? : 4\n", "Are you experiencing any \n", - "itching ? : no\n", - "skin_rash ? : no\n", - "nodal_skin_eruptions ? : no\n", - "dischromic _patches ? : no\n", - "It might not be that bad but you should take precautions.\n", - "You may have Fungal infection or Impetigo\n", - "In humans, fungal infections occur when an invading fungus takes over an area of the body and is too much for the immune system to handle. Fungi can live in the air, soil, water, and plants. There are also some fungi that live naturally in the human body. Like many microbes, there are helpful fungi and harmful fungi.\n", - "Impetigo (im-puh-TIE-go) is a common and highly contagious skin infection that mainly affects infants and children. Impetigo usually appears as red sores on the face, especially around a child's nose and mouth, and on hands and feet. The sores burst and develop honey-colored crusts.\n", - "Take following measures : \n", - "1 ) bath twice\n", - "2 ) use detol or neem in bathing water\n", - "3 ) keep infected area dry\n", - "4 ) use clean cloths\n", - "----------------------------------------------------------------------------------------\n" + "back_pain ? : no\n", + "weakness_in_limbs ? : no\n", + "neck_pain ? : no\n", + "dizziness ? : no\n", + "loss_of_balance ? : no\n" ] }, { @@ -51,6 +39,28 @@ "C:\\Users\\soham\\anaconda3\\envs\\healthbot\\lib\\site-packages\\sklearn\\base.py:439: UserWarning: X does not have valid feature names, but DecisionTreeClassifier was fitted with feature names\n", " warnings.warn(\n" ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "It might not be that bad but you should take precautions.\n", + "You may have Cervical spondylosis or Impetigo\n", + "Cervical spondylosis is a general term for age-related wear and tear affecting the spinal disks in your neck. As the disks dehydrate and shrink, signs of osteoarthritis develop, including bony projections along the edges of bones (bone spurs).\n", + "Impetigo (im-puh-TIE-go) is a common and highly contagious skin infection that mainly affects infants and children. Impetigo usually appears as red sores on the face, especially around a child's nose and mouth, and on hands and feet. The sores burst and develop honey-colored crusts.\n", + "Take following measures : \n", + "1 ) use heating pad or cold pack\n", + "2 ) exercise\n", + "3 ) take otc pain reliver\n", + "4 ) consult doctor\n", + "----------------------------------------------------------------------------------------\n", + "0.9766013464201185\n", + "for svm: \n", + "1.0\n", + "-----------------------------------HealthCare ChatBot-----------------------------------\n", + "\n", + "Your Name? \t\t\t\t->" + ] } ], "source": [ @@ -65,9 +75,6 @@ "from sklearn.svm import SVC\n", "import csv\n", "import warnings\n", - "from tkinter import *\n", - "from customtkinter import *\n", - "from PIL import ImageTk,Image\n", "warnings.filterwarnings(\"ignore\", category=DeprecationWarning)\n", "\n", "\n", @@ -178,11 +185,11 @@ " precautionDictionary.update(_prec)\n", "\n", "\n", - "\"\"\"def getInfo():\n", + "def getInfo():\n", " print(\"-----------------------------------HealthCare ChatBot-----------------------------------\")\n", " print(\"\\nYour Name? \\t\\t\\t\\t\",end=\"->\")\n", " name=input(\"\")\n", - " print(\"Hello, \",name)\"\"\"\n", + " print(\"Hello, \",name)\n", "\n", "def check_pattern(dis_list,inp):\n", " pred_list=[]\n", @@ -225,10 +232,6 @@ "\n", " chk_dis=\",\".join(feature_names).split(\",\")\n", " symptoms_present = []\n", - " print(\"-----------------------------------HealthCare ChatBot-----------------------------------\")\n", - " print(\"\\nYour Name? \\t\\t\\t\\t\",end=\"->\")\n", - " name=input(\"\")\n", - " print(\"Hello, \",name)\n", "\n", " while True:\n", "\n", @@ -326,187 +329,1847 @@ "getSeverityDict()\n", "getDescription()\n", "getprecautionDict()\n", - "#getInfo()\n", + "getInfo()\n", "tree_to_code(clf,cols)\n", "print(\"----------------------------------------------------------------------------------------\")\n", "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "33356b87", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "-----------------------------------HealthCare ChatBot-----------------------------------\n", - "\n", - "Your Name? \t\t\t\t->soham\n", - "Hello, soham\n", - "\n", - "Enter the symptom you are experiencing \t\t->n\n", - "searches related to input: \n", - "0 ) itching\n", - "1 ) skin_rash\n", - "2 ) nodal_skin_eruptions\n", - "3 ) continuous_sneezing\n", - "4 ) shivering\n", - "5 ) joint_pain\n", - "6 ) stomach_pain\n", - "7 ) ulcers_on_tongue\n", - "8 ) muscle_wasting\n", - "9 ) vomiting\n", - "10 ) burning_micturition\n", - "11 ) spotting_ urination\n", - "12 ) weight_gain\n", - "13 ) anxiety\n", - "14 ) cold_hands_and_feets\n", - "15 ) mood_swings\n", - "16 ) restlessness\n", - "17 ) patches_in_throat\n", - "18 ) sunken_eyes\n", - "19 ) breathlessness\n", - "20 ) sweating\n", - "21 ) dehydration\n", - "22 ) indigestion\n", - "23 ) yellowish_skin\n", - "24 ) dark_urine\n", - "25 ) nausea\n", - "26 ) pain_behind_the_eyes\n", - "27 ) back_pain\n", - "28 ) constipation\n", - "29 ) abdominal_pain\n", - "30 ) yellow_urine\n", - "31 ) yellowing_of_eyes\n", - "32 ) swelling_of_stomach\n", - "33 ) swelled_lymph_nodes\n", - "34 ) blurred_and_distorted_vision\n", - "35 ) throat_irritation\n", - "36 ) redness_of_eyes\n", - "37 ) sinus_pressure\n", - "38 ) runny_nose\n", - "39 ) congestion\n", - "40 ) chest_pain\n", - "41 ) weakness_in_limbs\n", - "42 ) pain_during_bowel_movements\n", - "43 ) pain_in_anal_region\n", - "44 ) irritation_in_anus\n", - "45 ) neck_pain\n", - "46 ) dizziness\n", - "47 ) bruising\n", - "48 ) swollen_legs\n", - "49 ) swollen_blood_vessels\n", - "50 ) puffy_face_and_eyes\n", - "51 ) enlarged_thyroid\n", - "52 ) brittle_nails\n", - "53 ) swollen_extremeties\n", - "54 ) excessive_hunger\n", - "55 ) extra_marital_contacts\n", - "56 ) drying_and_tingling_lips\n", - "57 ) knee_pain\n", - "58 ) hip_joint_pain\n", - "59 ) muscle_weakness\n", - "60 ) stiff_neck\n", - "61 ) swelling_joints\n", - "62 ) movement_stiffness\n", - "63 ) spinning_movements\n", - "64 ) loss_of_balance\n", - "65 ) unsteadiness\n", - "66 ) weakness_of_one_body_side\n", - "67 ) foul_smell_of urine\n", - "68 ) continuous_feel_of_urine\n", - "69 ) internal_itching\n", - "70 ) depression\n", - "71 ) muscle_pain\n", - "72 ) altered_sensorium\n", - "73 ) belly_pain\n", - "74 ) abnormal_menstruation\n", - "75 ) watering_from_eyes\n", - "76 ) increased_appetite\n", - "77 ) lack_of_concentration\n", - "78 ) visual_disturbances\n", - "79 ) receiving_blood_transfusion\n", - "80 ) receiving_unsterile_injections\n", - "81 ) stomach_bleeding\n", - "82 ) distention_of_abdomen\n", - "83 ) history_of_alcohol_consumption\n", - "84 ) blood_in_sputum\n", - "85 ) prominent_veins_on_calf\n", - "86 ) palpitations\n", - "87 ) painful_walking\n", - "88 ) scurring\n", - "89 ) skin_peeling\n", - "90 ) silver_like_dusting\n", - "91 ) small_dents_in_nails\n", - "92 ) inflammatory_nails\n", - "93 ) red_sore_around_nose\n", - "Select the one you meant (0 - 93): 0\n", - "Okay. From how many days ? : 0\n", - "Are you experiencing any \n", - "itching ? : no0\n", - "provide proper answers i.e. (yes/no) : no\n", - "skin_rash ? : no\n", - "stomach_pain ? : no\n", - "burning_micturition ? : no\n", - "spotting_ urination ? : no\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\soham\\anaconda3\\envs\\healthbot\\lib\\site-packages\\sklearn\\base.py:439: UserWarning: X does not have valid feature names, but DecisionTreeClassifier was fitted with feature names\n", - " warnings.warn(\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "It might not be that bad but you should take precautions.\n", - "You may have Drug Reaction or Peptic ulcer diseae\n", - "An adverse drug reaction (ADR) is an injury caused by taking medication. ADRs may occur following a single dose or prolonged administration of a drug or result from the combination of two or more drugs.\n", - "Peptic ulcer disease (PUD) is a break in the inner lining of the stomach, the first part of the small intestine, or sometimes the lower esophagus. An ulcer in the stomach is called a gastric ulcer, while one in the first part of the intestines is a duodenal ulcer.\n", - "Take following measures : \n", - "1 ) stop irritation\n", - "2 ) consult nearest hospital\n", - "3 ) stop taking drug\n", - "4 ) follow up\n" - ] - } - ], - "source": [ - "###################################### GUI ####################################################\n", - "\n", - "app = Tk()\n", - "app.config(bg=\"#000080\")\n", - "app.title(\"A.I.D.A.\")\n", - "app.geometry(\"400x700\")\n", - "img1=Image.open(\"bg.png\")\n", - "img2=ImageTk.PhotoImage(img1)\n", - "label1=Label(app)\n", - "#label1.config(image=img2)\n", - "label1.place(x=0,y=0)\n", - "text =Message(app, text=\"Hello I am A.I.D.A. your personal healthcare assistant. Please enter your name so that I can personally assist you!\", bg=\"red\", fg=\"white\", width =300)\n", - "# Showing the label\n", - "#text.pack()\n", - "text.place(x=5,y=10) \n", - "box=Text(app,width=38, height=4, padx=5, pady=5)\n", - "box.place(x=0,y=570)\n", - "sendbtn=Button(app, text=\"Send\", bg=\"black\", fg=\"white\", width=11,height=4, command=tree_to_code(clf,cols))\n", - "sendbtn.place(x=320,y=570)\n", - "# Running an event loop\n", - "app.mainloop()\n" - ] - }, - { - "cell_type": "code", - "execution_count": 0, - "id": "ef5690a3", + "import re\n", + "import pandas as pd\n", + "import pyttsx3\n", + "from sklearn import preprocessing\n", + "from sklearn.tree import DecisionTreeClassifier,_tree\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.model_selection import cross_val_score\n", + "from sklearn.svm import SVC\n", + "import csv\n", + "import warnings\n", + "warnings.filterwarnings(\"ignore\", category=DeprecationWarning)\n", + "\n", + "\n", + "training = pd.read_csv('Data/Training.csv')\n", + "testing= pd.read_csv('Data/Testing.csv')\n", + "cols= training.columns\n", + "cols= cols[:-1]\n", + "x = training[cols]\n", + "y = training['prognosis']\n", + "y1= y\n", + "\n", + "\n", + "reduced_data = training.groupby(training['prognosis']).max()\n", + "\n", + "#mapping strings to numbers\n", + "le = preprocessing.LabelEncoder()\n", + "le.fit(y)\n", + "y = le.transform(y)\n", + "\n", + "\n", + "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.33, random_state=42)\n", + "testx = testing[cols]\n", + "testy = testing['prognosis'] \n", + "testy = le.transform(testy)\n", + "\n", + "\n", + "clf1 = DecisionTreeClassifier()\n", + "clf = clf1.fit(x_train,y_train)\n", + "# print(clf.score(x_train,y_train))\n", + "# print (\"cross result========\")\n", + "scores = cross_val_score(clf, x_test, y_test, cv=3)\n", + "# print (scores)\n", + "print (scores.mean())\n", + "\n", + "\n", + "model=SVC()\n", + "model.fit(x_train,y_train)\n", + "print(\"for svm: \")\n", + "print(model.score(x_test,y_test))\n", + "\n", + "importances = clf.feature_importances_\n", + "indices = np.argsort(importances)[::-1]\n", + "features = cols\n", + "\n", + "def readn(nstr):\n", + " engine = pyttsx3.init()\n", + "\n", + " engine.setProperty('voice', \"english+f5\")\n", + " engine.setProperty('rate', 130)\n", + "\n", + " engine.say(nstr)\n", + " engine.runAndWait()\n", + " engine.stop()\n", + "\n", + "\n", + "severityDictionary=dict()\n", + "description_list = dict()\n", + "precautionDictionary=dict()\n", + "\n", + "symptoms_dict = {}\n", + "\n", + "for index, symptom in enumerate(x):\n", + " symptoms_dict[symptom] = index\n", + "def calc_condition(exp,days):\n", + " sum=0\n", + " for item in exp:\n", + " sum=sum+severityDictionary[item]\n", + " if((sum*days)/(len(exp)+1)>13):\n", + " print(\"You should take the consultation from doctor. \")\n", + " else:\n", + " print(\"It might not be that bad but you should take precautions.\")\n", + "\n", + "\n", + "def getDescription():\n", + " global description_list\n", + " with open('MasterData/symptom_Description.csv') as csv_file:\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " for row in csv_reader:\n", + " _description={row[0]:row[1]}\n", + " description_list.update(_description)\n", + "\n", + "\n", + "\n", + "\n", + "def getSeverityDict():\n", + " global severityDictionary\n", + " with open('MasterData/symptom_severity.csv') as csv_file:\n", + "\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " try:\n", + " for row in csv_reader:\n", + " _diction={row[0]:int(row[1])}\n", + " severityDictionary.update(_diction)\n", + " except:\n", + " pass\n", + "\n", + "\n", + "def getprecautionDict():\n", + " global precautionDictionary\n", + " with open('MasterData/symptom_precaution.csv') as csv_file:\n", + "\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " for row in csv_reader:\n", + " _prec={row[0]:[row[1],row[2],row[3],row[4]]}\n", + " precautionDictionary.update(_prec)\n", + "\n", + "\n", + "def getInfo():\n", + " print(\"-----------------------------------HealthCare ChatBot-----------------------------------\")\n", + " print(\"\\nYour Name? \\t\\t\\t\\t\",end=\"->\")\n", + " name=input(\"\")\n", + " print(\"Hello, \",name)\n", + "\n", + "def check_pattern(dis_list,inp):\n", + " pred_list=[]\n", + " inp=inp.replace(' ','_')\n", + " patt = f\"{inp}\"\n", + " regexp = re.compile(patt)\n", + " pred_list=[item for item in dis_list if regexp.search(item)]\n", + " if(len(pred_list)>0):\n", + " return 1,pred_list\n", + " else:\n", + " return 0,[]\n", + "def sec_predict(symptoms_exp):\n", + " df = pd.read_csv('Data/Training.csv')\n", + " X = df.iloc[:, :-1]\n", + " y = df['prognosis']\n", + " X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=20)\n", + " rf_clf = DecisionTreeClassifier()\n", + " rf_clf.fit(X_train, y_train)\n", + "\n", + " symptoms_dict = {symptom: index for index, symptom in enumerate(X)}\n", + " input_vector = np.zeros(len(symptoms_dict))\n", + " for item in symptoms_exp:\n", + " input_vector[[symptoms_dict[item]]] = 1\n", + "\n", + " return rf_clf.predict([input_vector])\n", + "\n", + "\n", + "def print_disease(node):\n", + " node = node[0]\n", + " val = node.nonzero() \n", + " disease = le.inverse_transform(val[0])\n", + " return list(map(lambda x:x.strip(),list(disease)))\n", + "\n", + "def tree_to_code(tree, feature_names):\n", + " tree_ = tree.tree_\n", + " feature_name = [\n", + " feature_names[i] if i != _tree.TREE_UNDEFINED else \"undefined!\"\n", + " for i in tree_.feature\n", + " ]\n", + "\n", + " chk_dis=\",\".join(feature_names).split(\",\")\n", + " symptoms_present = []\n", + "\n", + " while True:\n", + "\n", + " print(\"\\nEnter the symptom you are experiencing \\t\\t\",end=\"->\")\n", + " disease_input = input(\"\")\n", + " conf,cnf_dis=check_pattern(chk_dis,disease_input)\n", + " if conf==1:\n", + " print(\"searches related to input: \")\n", + " for num,it in enumerate(cnf_dis):\n", + " print(num,\")\",it)\n", + " if num!=0:\n", + " print(f\"Select the one you meant (0 - {num}): \", end=\"\")\n", + " conf_inp = int(input(\"\"))\n", + " else:\n", + " conf_inp=0\n", + "\n", + " disease_input=cnf_dis[conf_inp]\n", + " break\n", + " # print(\"Did you mean: \",cnf_dis,\"?(yes/no) :\",end=\"\")\n", + " # conf_inp = input(\"\")\n", + " # if(conf_inp==\"yes\"):\n", + " # break\n", + " else:\n", + " print(\"Enter valid symptom.\")\n", + "\n", + " while True:\n", + " try:\n", + " num_days=int(input(\"Okay. From how many days ? : \"))\n", + " break\n", + " except:\n", + " print(\"Enter valid input.\")\n", + " def recurse(node, depth):\n", + " indent = \" \" * depth\n", + " if tree_.feature[node] != _tree.TREE_UNDEFINED:\n", + " name = feature_name[node]\n", + " threshold = tree_.threshold[node]\n", + "\n", + " if name == disease_input:\n", + " val = 1\n", + " else:\n", + " val = 0\n", + " if val <= threshold:\n", + " recurse(tree_.children_left[node], depth + 1)\n", + " else:\n", + " symptoms_present.append(name)\n", + " recurse(tree_.children_right[node], depth + 1)\n", + " else:\n", + " present_disease = print_disease(tree_.value[node])\n", + " # print( \"You may have \" + present_disease )\n", + " red_cols = reduced_data.columns \n", + " symptoms_given = red_cols[reduced_data.loc[present_disease].values[0].nonzero()]\n", + " # dis_list=list(symptoms_present)\n", + " # if len(dis_list)!=0:\n", + " # print(\"symptoms present \" + str(list(symptoms_present)))\n", + " # print(\"symptoms given \" + str(list(symptoms_given)) )\n", + " print(\"Are you experiencing any \")\n", + " symptoms_exp=[]\n", + " for syms in list(symptoms_given):\n", + " inp=\"\"\n", + " print(syms,\"? : \",end='')\n", + " while True:\n", + " inp=input(\"\")\n", + " if(inp==\"yes\" or inp==\"no\"):\n", + " break\n", + " else:\n", + " print(\"provide proper answers i.e. (yes/no) : \",end=\"\")\n", + " if(inp==\"yes\"):\n", + " symptoms_exp.append(syms)\n", + "\n", + " second_prediction=sec_predict(symptoms_exp)\n", + " # print(second_prediction)\n", + " calc_condition(symptoms_exp,num_days)\n", + " if(present_disease[0]==second_prediction[0]):\n", + " print(\"You may have \", present_disease[0])\n", + " print(description_list[present_disease[0]])\n", + "\n", + " # readn(f\"You may have {present_disease[0]}\")\n", + " # readn(f\"{description_list[present_disease[0]]}\")\n", + "\n", + " else:\n", + " print(\"You may have \", present_disease[0], \"or \", second_prediction[0])\n", + " print(description_list[present_disease[0]])\n", + " print(description_list[second_prediction[0]])\n", + "\n", + " # print(description_list[present_disease[0]])\n", + " precution_list=precautionDictionary[present_disease[0]]\n", + " print(\"Take following measures : \")\n", + " for i,j in enumerate(precution_list):\n", + " print(i+1,\")\",j)\n", + "\n", + " # confidence_level = (1.0*len(symptoms_present))/len(symptoms_given)\n", + " # print(\"confidence level is \" + str(confidence_level))\n", + "\n", + " recurse(0, 1)\n", + "getSeverityDict()\n", + "getDescription()\n", + "getprecautionDict()\n", + "getInfo()\n", + "tree_to_code(clf,cols)\n", + "print(\"----------------------------------------------------------------------------------------\")\n", + "\n", + "import re\n", + "import pandas as pd\n", + "import pyttsx3\n", + "from sklearn import preprocessing\n", + "from sklearn.tree import DecisionTreeClassifier,_tree\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.model_selection import cross_val_score\n", + "from sklearn.svm import SVC\n", + "import csv\n", + "import warnings\n", + "warnings.filterwarnings(\"ignore\", category=DeprecationWarning)\n", + "\n", + "\n", + "training = pd.read_csv('Data/Training.csv')\n", + "testing= pd.read_csv('Data/Testing.csv')\n", + "cols= training.columns\n", + "cols= cols[:-1]\n", + "x = training[cols]\n", + "y = training['prognosis']\n", + "y1= y\n", + "\n", + "\n", + "reduced_data = training.groupby(training['prognosis']).max()\n", + "\n", + "#mapping strings to numbers\n", + "le = preprocessing.LabelEncoder()\n", + "le.fit(y)\n", + "y = le.transform(y)\n", + "\n", + "\n", + "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.33, random_state=42)\n", + "testx = testing[cols]\n", + "testy = testing['prognosis'] \n", + "testy = le.transform(testy)\n", + "\n", + "\n", + "clf1 = DecisionTreeClassifier()\n", + "clf = clf1.fit(x_train,y_train)\n", + "# print(clf.score(x_train,y_train))\n", + "# print (\"cross result========\")\n", + "scores = cross_val_score(clf, x_test, y_test, cv=3)\n", + "# print (scores)\n", + "print (scores.mean())\n", + "\n", + "\n", + "model=SVC()\n", + "model.fit(x_train,y_train)\n", + "print(\"for svm: \")\n", + "print(model.score(x_test,y_test))\n", + "\n", + "importances = clf.feature_importances_\n", + "indices = np.argsort(importances)[::-1]\n", + "features = cols\n", + "\n", + "def readn(nstr):\n", + " engine = pyttsx3.init()\n", + "\n", + " engine.setProperty('voice', \"english+f5\")\n", + " engine.setProperty('rate', 130)\n", + "\n", + " engine.say(nstr)\n", + " engine.runAndWait()\n", + " engine.stop()\n", + "\n", + "\n", + "severityDictionary=dict()\n", + "description_list = dict()\n", + "precautionDictionary=dict()\n", + "\n", + "symptoms_dict = {}\n", + "\n", + "for index, symptom in enumerate(x):\n", + " symptoms_dict[symptom] = index\n", + "def calc_condition(exp,days):\n", + " sum=0\n", + " for item in exp:\n", + " sum=sum+severityDictionary[item]\n", + " if((sum*days)/(len(exp)+1)>13):\n", + " print(\"You should take the consultation from doctor. \")\n", + " else:\n", + " print(\"It might not be that bad but you should take precautions.\")\n", + "\n", + "\n", + "def getDescription():\n", + " global description_list\n", + " with open('MasterData/symptom_Description.csv') as csv_file:\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " for row in csv_reader:\n", + " _description={row[0]:row[1]}\n", + " description_list.update(_description)\n", + "\n", + "\n", + "\n", + "\n", + "def getSeverityDict():\n", + " global severityDictionary\n", + " with open('MasterData/symptom_severity.csv') as csv_file:\n", + "\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " try:\n", + " for row in csv_reader:\n", + " _diction={row[0]:int(row[1])}\n", + " severityDictionary.update(_diction)\n", + " except:\n", + " pass\n", + "\n", + "\n", + "def getprecautionDict():\n", + " global precautionDictionary\n", + " with open('MasterData/symptom_precaution.csv') as csv_file:\n", + "\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " for row in csv_reader:\n", + " _prec={row[0]:[row[1],row[2],row[3],row[4]]}\n", + " precautionDictionary.update(_prec)\n", + "\n", + "\n", + "def getInfo():\n", + " print(\"-----------------------------------HealthCare ChatBot-----------------------------------\")\n", + " print(\"\\nYour Name? \\t\\t\\t\\t\",end=\"->\")\n", + " name=input(\"\")\n", + " print(\"Hello, \",name)\n", + "\n", + "def check_pattern(dis_list,inp):\n", + " pred_list=[]\n", + " inp=inp.replace(' ','_')\n", + " patt = f\"{inp}\"\n", + " regexp = re.compile(patt)\n", + " pred_list=[item for item in dis_list if regexp.search(item)]\n", + " if(len(pred_list)>0):\n", + " return 1,pred_list\n", + " else:\n", + " return 0,[]\n", + "def sec_predict(symptoms_exp):\n", + " df = pd.read_csv('Data/Training.csv')\n", + " X = df.iloc[:, :-1]\n", + " y = df['prognosis']\n", + " X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=20)\n", + " rf_clf = DecisionTreeClassifier()\n", + " rf_clf.fit(X_train, y_train)\n", + "\n", + " symptoms_dict = {symptom: index for index, symptom in enumerate(X)}\n", + " input_vector = np.zeros(len(symptoms_dict))\n", + " for item in symptoms_exp:\n", + " input_vector[[symptoms_dict[item]]] = 1\n", + "\n", + " return rf_clf.predict([input_vector])\n", + "\n", + "\n", + "def print_disease(node):\n", + " node = node[0]\n", + " val = node.nonzero() \n", + " disease = le.inverse_transform(val[0])\n", + " return list(map(lambda x:x.strip(),list(disease)))\n", + "\n", + "def tree_to_code(tree, feature_names):\n", + " tree_ = tree.tree_\n", + " feature_name = [\n", + " feature_names[i] if i != _tree.TREE_UNDEFINED else \"undefined!\"\n", + " for i in tree_.feature\n", + " ]\n", + "\n", + " chk_dis=\",\".join(feature_names).split(\",\")\n", + " symptoms_present = []\n", + "\n", + " while True:\n", + "\n", + " print(\"\\nEnter the symptom you are experiencing \\t\\t\",end=\"->\")\n", + " disease_input = input(\"\")\n", + " conf,cnf_dis=check_pattern(chk_dis,disease_input)\n", + " if conf==1:\n", + " print(\"searches related to input: \")\n", + " for num,it in enumerate(cnf_dis):\n", + " print(num,\")\",it)\n", + " if num!=0:\n", + " print(f\"Select the one you meant (0 - {num}): \", end=\"\")\n", + " conf_inp = int(input(\"\"))\n", + " else:\n", + " conf_inp=0\n", + "\n", + " disease_input=cnf_dis[conf_inp]\n", + " break\n", + " # print(\"Did you mean: \",cnf_dis,\"?(yes/no) :\",end=\"\")\n", + " # conf_inp = input(\"\")\n", + " # if(conf_inp==\"yes\"):\n", + " # break\n", + " else:\n", + " print(\"Enter valid symptom.\")\n", + "\n", + " while True:\n", + " try:\n", + " num_days=int(input(\"Okay. From how many days ? : \"))\n", + " break\n", + " except:\n", + " print(\"Enter valid input.\")\n", + " def recurse(node, depth):\n", + " indent = \" \" * depth\n", + " if tree_.feature[node] != _tree.TREE_UNDEFINED:\n", + " name = feature_name[node]\n", + " threshold = tree_.threshold[node]\n", + "\n", + " if name == disease_input:\n", + " val = 1\n", + " else:\n", + " val = 0\n", + " if val <= threshold:\n", + " recurse(tree_.children_left[node], depth + 1)\n", + " else:\n", + " symptoms_present.append(name)\n", + " recurse(tree_.children_right[node], depth + 1)\n", + " else:\n", + " present_disease = print_disease(tree_.value[node])\n", + " # print( \"You may have \" + present_disease )\n", + " red_cols = reduced_data.columns \n", + " symptoms_given = red_cols[reduced_data.loc[present_disease].values[0].nonzero()]\n", + " # dis_list=list(symptoms_present)\n", + " # if len(dis_list)!=0:\n", + " # print(\"symptoms present \" + str(list(symptoms_present)))\n", + " # print(\"symptoms given \" + str(list(symptoms_given)) )\n", + " print(\"Are you experiencing any \")\n", + " symptoms_exp=[]\n", + " for syms in list(symptoms_given):\n", + " inp=\"\"\n", + " print(syms,\"? : \",end='')\n", + " while True:\n", + " inp=input(\"\")\n", + " if(inp==\"yes\" or inp==\"no\"):\n", + " break\n", + " else:\n", + " print(\"provide proper answers i.e. (yes/no) : \",end=\"\")\n", + " if(inp==\"yes\"):\n", + " symptoms_exp.append(syms)\n", + "\n", + " second_prediction=sec_predict(symptoms_exp)\n", + " # print(second_prediction)\n", + " calc_condition(symptoms_exp,num_days)\n", + " if(present_disease[0]==second_prediction[0]):\n", + " print(\"You may have \", present_disease[0])\n", + " print(description_list[present_disease[0]])\n", + "\n", + " # readn(f\"You may have {present_disease[0]}\")\n", + " # readn(f\"{description_list[present_disease[0]]}\")\n", + "\n", + " else:\n", + " print(\"You may have \", present_disease[0], \"or \", second_prediction[0])\n", + " print(description_list[present_disease[0]])\n", + " print(description_list[second_prediction[0]])\n", + "\n", + " # print(description_list[present_disease[0]])\n", + " precution_list=precautionDictionary[present_disease[0]]\n", + " print(\"Take following measures : \")\n", + " for i,j in enumerate(precution_list):\n", + " print(i+1,\")\",j)\n", + "\n", + " # confidence_level = (1.0*len(symptoms_present))/len(symptoms_given)\n", + " # print(\"confidence level is \" + str(confidence_level))\n", + "\n", + " recurse(0, 1)\n", + "getSeverityDict()\n", + "getDescription()\n", + "getprecautionDict()\n", + "getInfo()\n", + "tree_to_code(clf,cols)\n", + "print(\"----------------------------------------------------------------------------------------\")\n", + "\n", + "import re\n", + "import pandas as pd\n", + "import pyttsx3\n", + "from sklearn import preprocessing\n", + "from sklearn.tree import DecisionTreeClassifier,_tree\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.model_selection import cross_val_score\n", + "from sklearn.svm import SVC\n", + "import csv\n", + "import warnings\n", + "warnings.filterwarnings(\"ignore\", category=DeprecationWarning)\n", + "\n", + "\n", + "training = pd.read_csv('Data/Training.csv')\n", + "testing= pd.read_csv('Data/Testing.csv')\n", + "cols= training.columns\n", + "cols= cols[:-1]\n", + "x = training[cols]\n", + "y = training['prognosis']\n", + "y1= y\n", + "\n", + "\n", + "reduced_data = training.groupby(training['prognosis']).max()\n", + "\n", + "#mapping strings to numbers\n", + "le = preprocessing.LabelEncoder()\n", + "le.fit(y)\n", + "y = le.transform(y)\n", + "\n", + "\n", + "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.33, random_state=42)\n", + "testx = testing[cols]\n", + "testy = testing['prognosis'] \n", + "testy = le.transform(testy)\n", + "\n", + "\n", + "clf1 = DecisionTreeClassifier()\n", + "clf = clf1.fit(x_train,y_train)\n", + "# print(clf.score(x_train,y_train))\n", + "# print (\"cross result========\")\n", + "scores = cross_val_score(clf, x_test, y_test, cv=3)\n", + "# print (scores)\n", + "print (scores.mean())\n", + "\n", + "\n", + "model=SVC()\n", + "model.fit(x_train,y_train)\n", + "print(\"for svm: \")\n", + "print(model.score(x_test,y_test))\n", + "\n", + "importances = clf.feature_importances_\n", + "indices = np.argsort(importances)[::-1]\n", + "features = cols\n", + "\n", + "def readn(nstr):\n", + " engine = pyttsx3.init()\n", + "\n", + " engine.setProperty('voice', \"english+f5\")\n", + " engine.setProperty('rate', 130)\n", + "\n", + " engine.say(nstr)\n", + " engine.runAndWait()\n", + " engine.stop()\n", + "\n", + "\n", + "severityDictionary=dict()\n", + "description_list = dict()\n", + "precautionDictionary=dict()\n", + "\n", + "symptoms_dict = {}\n", + "\n", + "for index, symptom in enumerate(x):\n", + " symptoms_dict[symptom] = index\n", + "def calc_condition(exp,days):\n", + " sum=0\n", + " for item in exp:\n", + " sum=sum+severityDictionary[item]\n", + " if((sum*days)/(len(exp)+1)>13):\n", + " print(\"You should take the consultation from doctor. \")\n", + " else:\n", + " print(\"It might not be that bad but you should take precautions.\")\n", + "\n", + "\n", + "def getDescription():\n", + " global description_list\n", + " with open('MasterData/symptom_Description.csv') as csv_file:\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " for row in csv_reader:\n", + " _description={row[0]:row[1]}\n", + " description_list.update(_description)\n", + "\n", + "\n", + "\n", + "\n", + "def getSeverityDict():\n", + " global severityDictionary\n", + " with open('MasterData/symptom_severity.csv') as csv_file:\n", + "\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " try:\n", + " for row in csv_reader:\n", + " _diction={row[0]:int(row[1])}\n", + " severityDictionary.update(_diction)\n", + " except:\n", + " pass\n", + "\n", + "\n", + "def getprecautionDict():\n", + " global precautionDictionary\n", + " with open('MasterData/symptom_precaution.csv') as csv_file:\n", + "\n", + " csv_reader = csv.reader(csv_file, delimiter=',')\n", + " line_count = 0\n", + " for row in csv_reader:\n", + " _prec={row[0]:[row[1],row[2],row[3],row[4]]}\n", + " precautionDictionary.update(_prec)\n", + "\n", + "\n", + "def getInfo():\n", + " print(\"-----------------------------------HealthCare ChatBot-----------------------------------\")\n", + " print(\"\\nYour Name? \\t\\t\\t\\t\",end=\"->\")\n", + " name=input(\"\")\n", + " print(\"Hello, \",name)\n", + "\n", + "def check_pattern(dis_list,inp):\n", + " pred_list=[]\n", + " inp=inp.replace(' ','_')\n", + " patt = f\"{inp}\"\n", + " regexp = re.compile(patt)\n", + " pred_list=[item for item in dis_list if regexp.search(item)]\n", + " if(len(pred_list)>0):\n", + " return 1,pred_list\n", + " else:\n", + " return 0,[]\n", + "def sec_predict(symptoms_exp):\n", + " df = pd.read_csv('Data/Training.csv')\n", + " X = df.iloc[:, :-1]\n", + " y = df['prognosis']\n", + " X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=20)\n", + " rf_clf = DecisionTreeClassifier()\n", + " rf_clf.fit(X_train, y_train)\n", + "\n", + " symptoms_dict = {symptom: index for index, symptom in enumerate(X)}\n", + " input_vector = np.zeros(len(symptoms_dict))\n", + " for item in symptoms_exp:\n", + " input_vector[[symptoms_dict[item]]] = 1\n", + "\n", + " return rf_clf.predict([input_vector])\n", + "\n", + "\n", + "def print_disease(node):\n", + " node = node[0]\n", + " val = node.nonzero() \n", + " disease = le.inverse_transform(val[0])\n", + " return list(map(lambda x:x.strip(),list(disease)))\n", + "\n", + "def tree_to_code(tree, feature_names):\n", + " tree_ = tree.tree_\n", + " feature_name = [\n", + " feature_names[i] if i != _tree.TREE_UNDEFINED else \"undefined!\"\n", + " for i in tree_.feature\n", + " ]\n", + "\n", + " chk_dis=\",\".join(feature_names).split(\",\")\n", + " symptoms_present = []\n", + "\n", + " while True:\n", + "\n", + " print(\"\\nEnter the symptom you are experiencing \\t\\t\",end=\"->\")\n", + " disease_input = input(\"\")\n", + " conf,cnf_dis=check_pattern(chk_dis,disease_input)\n", + " if conf==1:\n", + " print(\"searches related to input: \")\n", + " for num,it in enumerate(cnf_dis):\n", + " print(num,\")\",it)\n", + " if num!=0:\n", + " print(f\"Select the one you meant (0 - {num}): \", end=\"\")\n", + " conf_inp = int(input(\"\"))\n", + " else:\n", + " conf_inp=0\n", + "\n", + " disease_input=cnf_dis[conf_inp]\n", + " break\n", + " # print(\"Did you mean: \",cnf_dis,\"?(yes/no) :\",end=\"\")\n", + " # conf_inp = input(\"\")\n", + " # if(conf_inp==\"yes\"):\n", + " # break\n", + " else:\n", + " print(\"Enter valid symptom.\")\n", + "\n", + " while True:\n", + " try:\n", + " num_days=int(input(\"Okay. From how many days ? : \"))\n", + " break\n", + " except:\n", + " print(\"Enter valid input.\")\n", + " def recurse(node, depth):\n", + " indent = \" \" * depth\n", + " if tree_.feature[node] != _tree.TREE_UNDEFINED:\n", + " name = feature_name[node]\n", + " threshold = tree_.threshold[node]\n", + "\n", + " if name == disease_input:\n", + " val = 1\n", + " else:\n", + " val = 0\n", + " if val <= threshold:\n", + " recurse(tree_.children_left[node], depth + 1)\n", + " else:\n", + " symptoms_present.append(name)\n", + " recurse(tree_.children_right[node], depth + 1)\n", + " else:\n", + " present_disease = print_disease(tree_.value[node])\n", + " # print( \"You may have \" + present_disease )\n", + " red_cols = reduced_data.columns \n", + " symptoms_given = red_cols[reduced_data.loc[present_disease].values[0].nonzero()]\n", + " # dis_list=list(symptoms_present)\n", + " # if len(dis_list)!=0:\n", + " # print(\"symptoms present \" + str(list(symptoms_present)))\n", + " # print(\"symptoms given \" + str(list(symptoms_given)) )\n", + " print(\"Are you experiencing any \")\n", + " symptoms_exp=[]\n", + " for syms in list(symptoms_given):\n", + " inp=\"\"\n", + " print(syms,\"? : \",end='')\n", + " while True:\n", + " inp=input(\"\")\n", + " if(inp==\"yes\" or inp==\"no\"):\n", + " break\n", + " else:\n", + " print(\"provide proper answers i.e. (yes/no) : \",end=\"\")\n", + " if(inp==\"yes\"):\n", + " symptoms_exp.append(syms)\n", + "\n", + " second_prediction=sec_predict(symptoms_exp)\n", + " # print(second_prediction)\n", + " calc_condition(symptoms_exp,num_days)\n", + " if(present_disease[0]==second_prediction[0]):\n", + " print(\"You may have \", present_disease[0])\n", + " print(description_list[present_disease[0]])\n", + "\n", + " # readn(f\"You may have {present_disease[0]}\")\n", + " # readn(f\"{description_list[present_disease[0]]}\")\n", + "\n", + " else:\n", + " print(\"You may have \", present_disease[0], \"or \", second_prediction[0])\n", + " print(description_list[present_disease[0]])\n", + " print(description_list[second_prediction[0]])\n", + "\n", + " # print(description_list[present_disease[0]])\n", + " precution_list=precautionDictionary[present_disease[0]]\n", + " print(\"Take following measures : \")\n", + " for i,j in enumerate(precution_list):\n", + " print(i+1,\")\",j)\n", + "\n", + " # confidence_level = (1.0*len(symptoms_present))/len(symptoms_given)\n", + " # print(\"confidence level is \" + str(confidence_level))\n", + "\n", + " recurse(0, 1)\n", + "getSeverityDict()\n", + "getDescription()\n", + "getprecautionDict()\n", + "getInfo()\n", + "tree_to_code(clf,cols)\n", + "print(\"----------------------------------------------------------------------------------------\")\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "33356b87", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ef5690a3", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f2d9076c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8da9b836", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "692fc2bd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6df23640", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "73656cd0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "99b80946", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "22915c77", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "99f4268c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "26bd4243", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b8536727", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "040a5238", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "057b703f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3c5cb9b7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "17ff2ef0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0413475c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "11108558", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8b89387c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f26c8793", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d9ae7758", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f982b6ce", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c5a59435", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6016454c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cfdb314f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f33128a5", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4e929f29", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bb0d24c1", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e3a79bef", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "56490227", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8e5d2abd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a907f0e5", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9076896e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "50497f6f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "17003184", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "31a63d8f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f4e2e464", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ca3d4e43", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b49ab223", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ed61f368", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "81229a84", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "696b07b9", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "47e87abb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fa51a573", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "565866d0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "40bd7b20", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5f066347", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1db54f9e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "eeda3dfd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "09c9a00e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "04e8d95b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "038a446c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "abda2d7c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e24ae74b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "13923adb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3d747318", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e72165ec", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b15dec7b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dd89d4aa", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f972bb8e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1af5105f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "88f01100", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0df9375a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9966a474", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "69306d0e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "caba5c9d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1754a8fe", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6c3f56f0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3a3f372e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9ebb9c25", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "055efe1a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "86867f78", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "63b607b1", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "77c442bb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b65e9a90", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "15c8f1a7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e91f9264", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cdcbb7e3", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "307aa1e7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b0358205", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6dc329a8", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0ef3301d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "678d62d0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "90b07348", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9b0bd16b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4344bf97", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b70d6471", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d54b1c77", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "52d7450c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "16a710cb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "56cf61fd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "69924d0e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "41b9883f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "aff0f483", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "65ef9f4a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bc2d99a9", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "38198973", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7d16d1a7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5e7e055b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "86f1c86a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d8c3fb0c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "49fbca4e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "076037fb", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3f4f884e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "837ebbd2", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2938bc4c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f9dc8a82", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "693eda76", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2a5ed572", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3074f79b", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c4c557e0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c08557e8", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "86498931", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9d06f490", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2c6ce44c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "666e89f4", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "781fbbf0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dd4a6186", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "30b8d70d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0da7dc5a", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ca01a51d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8bc5e502", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d400bfac", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e0713b39", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e22e5aa0", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e510d538", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c5d076cd", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0ac2d344", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "83de60d6", "metadata": {}, "outputs": [], "source": [] diff --git a/gui.ipynb b/gui.ipynb deleted file mode 100644 index 1bec182..0000000 --- a/gui.ipynb +++ /dev/null @@ -1,57 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 2, - "id": "bf26f4c7", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9b8b4ffd", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2752da7b", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e4486e2b", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/hello.py b/hello.py deleted file mode 100644 index 37d463c..0000000 --- a/hello.py +++ /dev/null @@ -1,13 +0,0 @@ -import sys -from PyQt6.QtWidgets import QApplication, QLabel, QWidget -app=QApplication([]) -window = QWidget() -window.setWindowTitle("PyQt App") -window.setGeometry(100, 100, 280, 80) -helloMsg = QLabel("

Hello, World!

", parent=window) -helloMsg.move(60, 15) -# 4. Show your application's GUI -window.show() - -# 5. Run your application's event loop -sys.exit(app.exec()) diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..df479e9 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,43 @@ + + + + + + + +

AI-Healthcare Chatbot

+
+
+

Please try typing full sentences as I am still learning!

+

I am a chatbot. You can begin conversation by typing in a message and pressing enter.

+

Hi There! What is your name?

+
+
+ + +
+ +
+ + \ No newline at end of file