hassaanik commited on
Commit
37ebac6
β€’
1 Parent(s): 02b9964

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +85 -3
README.md CHANGED
@@ -1,3 +1,85 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+
6
+ # AI Health Assistant
7
+
8
+ This project is a Flask-based web application that provides several machine learning-powered features such as:
9
+
10
+ - Counseling Response Generation using a GPT-2 model.
11
+ - Medication Information Generation using a GPT-2 model.
12
+ - Diabetes Classification using a Random Forest classifier.
13
+ - Medicine Classification using a K-Nearest Neighbors (KNN) model.
14
+ - General Chat powered by LLaMA 3.1 API hosted on Groq Cloud for AI-powered conversations.
15
+
16
+ The project is divided into two main parts: Backend (Flask) and Frontend (HTML, CSS, JavaScript), with a connection to pre-trained machine learning models.
17
+ ## Project Setup
18
+
19
+ - **System Requirements:**
20
+ - Python 3.8+
21
+ - Flask
22
+ - Transformers library (for GPT-2 models)
23
+ - Joblib (for loading pre-trained models)
24
+ - Langchain Groq (for LLaMA integration)
25
+ - Frontend: HTML, CSS, JavaScript
26
+
27
+ - **Project Structure:**
28
+ ```
29
+ AI Health Assistant/
30
+ β”‚
31
+ β”œβ”€β”€ backend/
32
+ β”‚ β”œβ”€β”€ models/
33
+ β”‚ β”‚ β”œβ”€β”€ mental_health_model/
34
+ β”‚ β”‚ β”œβ”€β”€ medication_info/
35
+ β”‚ β”‚ β”œβ”€β”€ diabetes_model/
36
+ β”‚ β”‚ β”œβ”€β”€ medication_classification_model/
37
+ β”‚ β”œβ”€β”€ utils.py
38
+ β”œβ”€β”€ frontend/
39
+ β”‚ β”œβ”€β”€ index.html
40
+ β”‚ β”œβ”€β”€ styles.css
41
+ β”‚ β”œβ”€β”€ script.js
42
+ β”œβ”€β”€ app.py
43
+ β”œβ”€β”€ requirements.txt
44
+ ## Backend
45
+
46
+ **Counseling Response Generation:**
47
+ - Generates counseling-related responses using a GPT-2 mental health model.
48
+
49
+ **Medication Information Generation:**
50
+ - Provides medication-related responses using a GPT-2 medication model.
51
+
52
+ **Diabetes Classification:**
53
+ - Classifies users as diabetic or non-diabetic based on glucose, BMI, and age using a Random Forest classifier.
54
+
55
+ **Medicine Classification:**
56
+ - Predicts suitable medications based on gender, blood type, medical condition, and test results using a K-Nearest Neighbors (KNN) model.
57
+
58
+ **General Chat:**
59
+ - Offers general chat responses using LLaMA 3.1 API hosted on Groq Cloud for AI-powered conversations.
60
+
61
+ ## Frontend
62
+
63
+ **Diabetes Classification Tab:**
64
+ - Form input for glucose, BMI, and age to classify diabetes risk.
65
+
66
+ **Medicine Classification Tab:**
67
+ - Input fields for gender, blood type, medical condition, and test results to classify appropriate medications.
68
+
69
+ **Counseling and Medication Tabs:**
70
+ - Text inputs for receiving AI-generated responses for counseling and medication questions.
71
+
72
+ **General Chat Tab:**
73
+ - General-purpose chatbot powered by LLaMA 3.1 for natural conversations.
74
+
75
+ **Dark Mode:**
76
+ - Toggle dark mode for user interface customization.
77
+ ## Usage
78
+
79
+ 1. **Access the Application:** Users interact with the web interface, accessible through a browser once the Flask server is running.
80
+
81
+ 2. **Input Data:** Users provide medical-related information or general queries depending on the feature they want to use.
82
+
83
+ 3. **Receive Responses:** Based on the input, AI models provide responses such as classification results (diabetes, medicine) or generated text (counseling, medication, chat).
84
+
85
+ 4. **Interactive Interface:** Users can toggle between different features, making it suitable for general chat, medical insights, or counseling help.