Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -1,119 +1,19 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
- Identifies symptoms and their duration in the patient's description
|
21 |
-
- Implemented as a Named Entity Recognition (NER) task
|
22 |
-
|
23 |
-
2. **Risk Classification Model**: [microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract](https://huggingface.co/microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract)
|
24 |
-
- Classifies the patient's condition into Low, Medium, or High risk
|
25 |
-
- Fine-tuned for medical risk assessment
|
26 |
-
|
27 |
-
3. **Recommendation Generation Model**: Fine-tuned T5-small
|
28 |
-
- Generates personalized medical recommendations
|
29 |
-
- Fine-tuned on a dataset of medical advice and recommendations
|
30 |
-
|
31 |
-
## π οΈ Installation
|
32 |
-
|
33 |
-
1. Clone this repository:
|
34 |
-
```bash
|
35 |
-
git clone <repository-url>
|
36 |
-
cd medical-consultation-system
|
37 |
-
```
|
38 |
-
|
39 |
-
2. Install the required packages:
|
40 |
-
```bash
|
41 |
-
pip install -r requirements.txt
|
42 |
-
```
|
43 |
-
|
44 |
-
3. Download the fine-tuned T5 model (if not included):
|
45 |
-
```bash
|
46 |
-
# Instructions for downloading or fine-tuning the T5 model would go here
|
47 |
-
# For example:
|
48 |
-
# python download_models.py
|
49 |
-
```
|
50 |
-
|
51 |
-
## π Usage
|
52 |
-
|
53 |
-
1. Run the Streamlit app:
|
54 |
-
```bash
|
55 |
-
streamlit run app.py
|
56 |
-
```
|
57 |
-
|
58 |
-
2. Open your web browser and navigate to the URL displayed in your terminal (typically http://localhost:8501)
|
59 |
-
|
60 |
-
3. Enter your symptoms in natural language in the text area
|
61 |
-
|
62 |
-
4. Click the "Analyze Symptoms" button to process your input
|
63 |
-
|
64 |
-
5. Review the results in the various tabs:
|
65 |
-
- **Overview**: Summary of symptoms, risk level, and recommendations
|
66 |
-
- **Symptoms Analysis**: Detailed analysis of extracted symptoms and duration
|
67 |
-
- **Risk Assessment**: Risk level with confidence and explanation
|
68 |
-
- **Recommendations**: Detailed medical recommendations and department suggestions
|
69 |
-
|
70 |
-
## π Example
|
71 |
-
|
72 |
-
Input:
|
73 |
-
```
|
74 |
-
I've been experiencing severe headaches and dizziness for about 2 weeks. Sometimes I also feel nauseous.
|
75 |
-
```
|
76 |
-
|
77 |
-
Output:
|
78 |
-
- **Extracted Symptoms**: Headaches, dizziness, nauseous
|
79 |
-
- **Duration**: 2 weeks
|
80 |
-
- **Risk Level**: Medium
|
81 |
-
- **Recommendation**: Personalized guidance on seeking medical attention and home care
|
82 |
-
|
83 |
-
## π Project Structure
|
84 |
-
|
85 |
-
```
|
86 |
-
medical-consultation-system/
|
87 |
-
βββ app.py # Main Streamlit application
|
88 |
-
βββ models.py # Model loading and inference code
|
89 |
-
βββ utils.py # Helper functions and utilities
|
90 |
-
βββ style.css # Custom CSS styling
|
91 |
-
βββ requirements.txt # Package dependencies
|
92 |
-
βββ README.md # Project documentation
|
93 |
-
βββ consultation_history/ # Stored consultation records (created on first use)
|
94 |
-
```
|
95 |
-
|
96 |
-
## β οΈ Limitations and Disclaimer
|
97 |
-
|
98 |
-
- This system is for **informational purposes only** and is not a substitute for professional medical advice, diagnosis, or treatment.
|
99 |
-
- The AI models may not capture all symptoms or correctly assess all conditions.
|
100 |
-
- Risk assessments and recommendations are based on general patterns and may not be accurate for specific individual cases.
|
101 |
-
- Always consult with qualified healthcare providers for medical concerns.
|
102 |
-
|
103 |
-
## π§ Customization
|
104 |
-
|
105 |
-
You can customize the system by:
|
106 |
-
- Fine-tuning the models on different or additional datasets
|
107 |
-
- Modifying the UI in app.py
|
108 |
-
- Adjusting the CSS styling in style.css
|
109 |
-
- Adding new features like multilingual support or additional visualization options
|
110 |
-
|
111 |
-
## π License
|
112 |
-
|
113 |
-
This project is licensed under the MIT License - see the LICENSE file for details.
|
114 |
-
|
115 |
-
## π Acknowledgements
|
116 |
-
|
117 |
-
- [Hugging Face](https://huggingface.co/) for providing access to pre-trained models
|
118 |
-
- [Streamlit](https://streamlit.io/) for the web application framework
|
119 |
-
- [Plotly](https://plotly.com/) for interactive visualizations
|
|
|
1 |
+
---
|
2 |
+
title: FinalProject
|
3 |
+
emoji: π
|
4 |
+
colorFrom: red
|
5 |
+
colorTo: red
|
6 |
+
sdk: docker
|
7 |
+
app_port: 8501
|
8 |
+
tags:
|
9 |
+
- streamlit
|
10 |
+
pinned: false
|
11 |
+
short_description: deep learning final project
|
12 |
+
---
|
13 |
+
|
14 |
+
# Welcome to Streamlit!
|
15 |
+
|
16 |
+
Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
|
17 |
+
|
18 |
+
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
|
19 |
+
forums](https://discuss.streamlit.io).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|