Aadityaramrame commited on
Commit
cf50781
Β·
verified Β·
1 Parent(s): 3340aa8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +105 -10
README.md CHANGED
@@ -1,13 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- title: Chatbot
3
- emoji: πŸ‘€
4
- colorFrom: indigo
5
- colorTo: gray
6
- sdk: gradio
7
- sdk_version: 5.49.1
8
- app_file: app.py
9
- pinned: false
10
- short_description: A medical Chatbot trained on 17k disease based questions
 
 
 
 
 
 
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🧠 **Cloud-Based Medical QA System**
2
+ ### ☁️ *AWS-Integrated Machine Learning Project*
3
+
4
+ ---
5
+
6
+ ## πŸ“‹ **Project Overview**
7
+ This project demonstrates a **cloud-deployed Machine Learning (ML)** application built to answer **medical-related questions** using a fine-tuned QA model.
8
+ The system leverages **AWS services** to ensure **scalability**, **accessibility**, and **secure management** of data and infrastructure.
9
+
10
+ The model was trained and deployed on an **Amazon EC2** instance, with data securely stored in an **Amazon S3** bucket.
11
+ Access permissions and security were managed using **AWS IAM (Identity and Access Management)**.
12
+
13
  ---
14
+
15
+ ## ☁️ **AWS Services Used**
16
+
17
+ ### πŸ” **1. AWS Identity and Access Management (IAM)**
18
+ **Purpose:**
19
+ - 🧾 Created and managed secure access permissions for different AWS resources.
20
+ - πŸ‘€ Configured a custom IAM user/role with limited access to S3 and EC2.
21
+ - πŸ›‘οΈ Followed the principle of *least privilege* to ensure minimal security risks.
22
+ - πŸ”‘ Used IAM for safe credential management during local access testing.
23
+
24
+ **Alternative (Not Implemented):**
25
+ - 🧰 *AWS Secrets Manager* for automatic credential rotation.
26
+
27
+ **Reason:** Not necessary for small-scale academic deployment and would increase complexity and cost.
28
+
29
  ---
30
 
31
+ ### πŸ—ƒοΈ **2. Amazon S3 (Simple Storage Service)**
32
+ **Purpose:**
33
+ - ☁️ Used for storing the `cleaned_medquad.csv` dataset, providing a reliable, cloud-based data source for the ML model.
34
+ - πŸ“€ The dataset was uploaded manually to an S3 bucket.
35
+ - πŸ—‚οΈ Served as a centralized, secure data storage solution.
36
+
37
+ **Alternative (Not Implemented):**
38
+ - πŸ”— Direct programmatic access using the **Boto3 SDK** to read data from S3 within the EC2 app.
39
+
40
+ **Reason:** For demonstration purposes, manual upload was sufficient, and integration was skipped to focus on showcasing AWS setup.
41
+
42
+ ---
43
+
44
+ ### πŸ’» **3. Amazon EC2 (Elastic Compute Cloud)**
45
+ **Purpose:**
46
+ - πŸš€ Used to host and run the ML model and **Gradio interface**.
47
+ - βš™οΈ Configured a `t2.medium` Ubuntu instance for deployment.
48
+ - 🧩 Executed Flask/Gradio app and tested successfully via public URL.
49
+ - πŸ” Verified full model functionality and response generation.
50
+
51
+ **Alternative (Not Implemented):**
52
+ - πŸͺΆ *AWS Lambda* or *AWS SageMaker* for serverless or managed ML hosting.
53
+
54
+ **Reason:** EC2 was ideal for this scale and provided better control over dependencies and environment setup.
55
+
56
+ ---
57
+
58
+ ## πŸš€ **Deployment Flow**
59
+ 1. 🧺 Dataset uploaded to **S3 bucket**
60
+ 2. πŸ” IAM role created for **secure access management**
61
+ 3. πŸ’» **EC2 instance** launched and configured
62
+ 4. πŸ€– ML application (Flask + Gradio) deployed and tested
63
+ 5. πŸ“ˆ Logs and results verified on **terminal and Gradio public link**
64
+
65
+ ---
66
+
67
+ ## 🧩 **Tech Stack**
68
+ | Layer | Tools & Technologies |
69
+ |-------|----------------------|
70
+ | 🧠 **Backend** | Python (Flask, Gradio) |
71
+ | ☁️ **Cloud** | AWS EC2, S3, IAM |
72
+ | 🧰 **Libraries** | Pandas, Transformers, Scikit-learn |
73
+ | πŸ“Š **Dataset** | Medical QA Dataset (`cleaned_medquad.csv`) |
74
+
75
+ ---
76
+
77
+ ## πŸ“Έ **Screenshots**
78
+ πŸ“ Available in the `/screenshots` folder:
79
+ 1. πŸ§‘β€πŸ’» IAM Roles and Permissions
80
+ 2. πŸͺ£ S3 Bucket with Uploaded Dataset
81
+ 3. πŸ’» EC2 Instance Configuration
82
+ 4. 🧾 Terminal Log (Model Running Successfully)
83
+ 5. 🌐 Gradio Interface Screenshot
84
+
85
+ ---
86
+
87
+ ## βš™οΈ **Future Integration**
88
+ Planned upgrades for the next version:
89
+ 1. πŸ€– Automate dataset retrieval using **Boto3**
90
+ 2. πŸ” Integrate **IAM role-based S3 access** into code
91
+ 3. 🧱 Deploy the model using **AWS SageMaker** for managed ML
92
+ 4. πŸ’Ύ Store model responses in **Amazon RDS** for persistence
93
+
94
+ ---
95
+
96
+ ## 🧹 **Resource Management**
97
+ All AWS resources (**EC2**, **IAM**, and **S3**) have been **safely terminated** after testing to prevent unnecessary billing.
98
+
99
+ ---
100
+
101
+ ## πŸ‘¨β€πŸ’» **Author**
102
+ **Aaditya Arvind Ramrame**
103
+ 🌩️ *Cloud and Machine Learning Enthusiast*
104
+ πŸ“§ [aadityaramrame@gmail.com](mailto:aadityaramrame@gmail.com)
105
+ πŸ”— [GitHub Profile](https://github.com/Aadityaramrame)
106
+
107
+ ---
108
+ ⭐ *β€œBringing Machine Learning to the Cloud β€” One Service at a Time.”* ☁️