Spaces:
Sleeping
Sleeping
Upload 4 files
#1
by
Konaguy - opened
- README.md +29 -12
- app.py +158 -0
- differential_diagnosis_dataset.csv +176 -0
- requirements.txt +5 -0
README.md
CHANGED
|
@@ -1,12 +1,29 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# AI-Powered Differential Diagnosis (Educational)
|
| 3 |
+
|
| 4 |
+
What this Space does
|
| 5 |
+
- You enter at least 3 comma-separated symptoms.
|
| 6 |
+
- The app compares your input to a dataset using TF-IDF similarity.
|
| 7 |
+
- It returns a differential list with scaled scores (0..1), example matches, and structured reasoning outlines (deterministic).
|
| 8 |
+
|
| 9 |
+
Files to upload to your Hugging Face Space
|
| 10 |
+
- `app.py` (this file)
|
| 11 |
+
- `requirements.txt`
|
| 12 |
+
- `differential_diagnosis_dataset.csv` (your dataset)
|
| 13 |
+
- (Optional) `README.md`
|
| 14 |
+
|
| 15 |
+
Dataset assumptions
|
| 16 |
+
- One column named `diagnosis` (lower/upper case both ok).
|
| 17 |
+
- Symptom columns contain the word `symptom`, `feature`, `sign`. If none found, all non-diagnosis columns are treated as symptoms.
|
| 18 |
+
|
| 19 |
+
Run locally
|
| 20 |
+
```bash
|
| 21 |
+
pip install -r requirements.txt
|
| 22 |
+
python app.py
|
| 23 |
+
```
|
| 24 |
+
Open http://127.0.0.1:7860
|
| 25 |
+
|
| 26 |
+
Safety
|
| 27 |
+
- This tool is for education and prototyping.
|
| 28 |
+
- It is not a substitute for a clinician.
|
| 29 |
+
- For urgent issues, contact emergency services.
|
app.py
ADDED
|
@@ -0,0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np
|
| 5 |
+
from sklearn.feature_extraction.text import TfidfVectorizer
|
| 6 |
+
from sklearn.metrics.pairwise import cosine_similarity
|
| 7 |
+
from typing import List, Tuple
|
| 8 |
+
|
| 9 |
+
DATASET_PATH = "differential_diagnosis_dataset.csv"
|
| 10 |
+
|
| 11 |
+
def load_dataset(path: str):
|
| 12 |
+
df = pd.read_csv(path)
|
| 13 |
+
# Identify diagnosis column (case-insensitive exact match or contains)
|
| 14 |
+
cols_lower = [c.lower() for c in df.columns]
|
| 15 |
+
if "diagnosis" in cols_lower:
|
| 16 |
+
diagnosis_col = df.columns[cols_lower.index("diagnosis")]
|
| 17 |
+
else:
|
| 18 |
+
diagnosis_col = None
|
| 19 |
+
for c in df.columns:
|
| 20 |
+
if "diagnos" in c.lower():
|
| 21 |
+
diagnosis_col = c
|
| 22 |
+
break
|
| 23 |
+
if diagnosis_col is None:
|
| 24 |
+
raise ValueError("No diagnosis column found. Please ensure a 'diagnosis' column exists.")
|
| 25 |
+
# Symptom columns heuristic
|
| 26 |
+
symptom_cols = [c for c in df.columns if ("symptom" in c.lower()) or ("feature" in c.lower()) or ("sign" in c.lower())]
|
| 27 |
+
if len(symptom_cols) == 0:
|
| 28 |
+
symptom_cols = [c for c in df.columns if c != diagnosis_col]
|
| 29 |
+
# Build a 'text' column by concatenating symptoms
|
| 30 |
+
def row_to_text(row):
|
| 31 |
+
parts = []
|
| 32 |
+
for c in symptom_cols:
|
| 33 |
+
val = row.get(c, "")
|
| 34 |
+
if pd.notna(val) and str(val).strip():
|
| 35 |
+
parts.append(str(val))
|
| 36 |
+
return ", ".join(parts)
|
| 37 |
+
df = df.copy()
|
| 38 |
+
df["_symptom_text"] = df.apply(row_to_text, axis=1)
|
| 39 |
+
return df, diagnosis_col, symptom_cols
|
| 40 |
+
|
| 41 |
+
# Global fit (loaded at startup)
|
| 42 |
+
try:
|
| 43 |
+
_df, _diagnosis_col, _symptom_cols = load_dataset(DATASET_PATH)
|
| 44 |
+
_corpus = _df["_symptom_text"].fillna("").astype(str).tolist()
|
| 45 |
+
_vectorizer = TfidfVectorizer(ngram_range=(1,2), min_df=1)
|
| 46 |
+
_X = _vectorizer.fit_transform(_corpus)
|
| 47 |
+
except Exception as e:
|
| 48 |
+
_df, _diagnosis_col, _symptom_cols = None, None, None
|
| 49 |
+
_corpus, _vectorizer, _X = [], None, None
|
| 50 |
+
_startup_error = str(e)
|
| 51 |
+
else:
|
| 52 |
+
_startup_error = ""
|
| 53 |
+
|
| 54 |
+
def normalize_symptoms(text: str) -> str:
|
| 55 |
+
return ", ".join([t.strip().lower() for t in text.split(",") if t.strip()])
|
| 56 |
+
|
| 57 |
+
def few_shot_prompt(symptoms: List[str], k_examples: int = 3) -> str:
|
| 58 |
+
if _X is None or _vectorizer is None:
|
| 59 |
+
return "Model not initialized."
|
| 60 |
+
query = ", ".join(symptoms)
|
| 61 |
+
qv = _vectorizer.transform([query])
|
| 62 |
+
sims = cosine_similarity(qv, _X).ravel()
|
| 63 |
+
top_idx = sims.argsort()[::-1][:k_examples]
|
| 64 |
+
examples = []
|
| 65 |
+
for i in top_idx:
|
| 66 |
+
examples.append(f"Symptoms: {{ {_df.loc[i, '_symptom_text']} }} -> Diagnosis: {{ {_df.loc[i, _diagnosis_col]} }}")
|
| 67 |
+
return "\n".join(examples)
|
| 68 |
+
|
| 69 |
+
def chain_of_reasoning(symptoms: List[str]) -> List[str]:
|
| 70 |
+
steps = []
|
| 71 |
+
steps.append("1) Parse input and standardize terms.")
|
| 72 |
+
steps.append("2) Match symptom pattern with dataset using TF-IDF similarity.")
|
| 73 |
+
steps.append("3) Collect top diagnoses and compute normalized scores.")
|
| 74 |
+
steps.append("4) Check for red-flag patterns (e.g., chest pain + shortness of breath).")
|
| 75 |
+
steps.append("5) Return differential list with triage flags. For care, consult a clinician.")
|
| 76 |
+
return steps
|
| 77 |
+
|
| 78 |
+
def tree_of_hypotheses(symptoms: List[str], top_n: int = 5) -> List[str]:
|
| 79 |
+
text = ", ".join(symptoms)
|
| 80 |
+
buckets = {
|
| 81 |
+
"cardio": ["chest pain","palpitations","syncope","shortness of breath"],
|
| 82 |
+
"neuro": ["headache","weakness","numbness","confusion","seizure"],
|
| 83 |
+
"gi": ["abdominal pain","nausea","vomiting","diarrhea","constipation"],
|
| 84 |
+
"pulm": ["cough","wheezing","dyspnea","hemoptysis"],
|
| 85 |
+
"id": ["fever","chills","night sweats","fatigue"]
|
| 86 |
+
}
|
| 87 |
+
matched = []
|
| 88 |
+
for system, keys in buckets.items():
|
| 89 |
+
if any(k in text for k in keys):
|
| 90 |
+
matched.append(system)
|
| 91 |
+
if not matched:
|
| 92 |
+
matched = ["general"]
|
| 93 |
+
return [f"Hypothesis branch: {m}" for m in matched]
|
| 94 |
+
|
| 95 |
+
def infer_differential(symptoms_text: str, top_k: int = 7) -> Tuple[str, list, list, list]:
|
| 96 |
+
if _startup_error:
|
| 97 |
+
return f"Startup error: {_startup_error}", [], [], []
|
| 98 |
+
cleaned = normalize_symptoms(symptoms_text)
|
| 99 |
+
tokens = [t for t in cleaned.split(",") if t]
|
| 100 |
+
if len(tokens) < 3:
|
| 101 |
+
return "Enter at least 3 symptoms (comma-separated).", [], [], []
|
| 102 |
+
|
| 103 |
+
query = ", ".join(tokens)
|
| 104 |
+
qv = _vectorizer.transform([query])
|
| 105 |
+
sims = cosine_similarity(qv, _X).ravel()
|
| 106 |
+
scores = {}
|
| 107 |
+
for i, s in enumerate(sims):
|
| 108 |
+
dx = str(_df.loc[i, _diagnosis_col])
|
| 109 |
+
scores[dx] = max(scores.get(dx, 0.0), float(s))
|
| 110 |
+
|
| 111 |
+
ranked = sorted(scores.items(), key=lambda x: x[1], reverse=True)[:top_k]
|
| 112 |
+
if ranked:
|
| 113 |
+
max_s = ranked[0][1] if ranked[0][1] > 0 else 1e-9
|
| 114 |
+
ranked = [(dx, round(score/max_s, 3)) for dx, score in ranked]
|
| 115 |
+
|
| 116 |
+
diffs = [f"• {dx} — score {score}" for dx, score in ranked]
|
| 117 |
+
fewshot = few_shot_prompt(tokens, k_examples=3)
|
| 118 |
+
chain = chain_of_reasoning(tokens)
|
| 119 |
+
tree = tree_of_hypotheses(tokens)
|
| 120 |
+
|
| 121 |
+
return "", diffs, chain, [fewshot] + tree
|
| 122 |
+
|
| 123 |
+
disclaimer = (
|
| 124 |
+
"Educational use only. Not medical advice.\n"
|
| 125 |
+
"Do not use this tool for emergencies.\n"
|
| 126 |
+
"If symptoms are severe or worsening, seek licensed care immediately."
|
| 127 |
+
)
|
| 128 |
+
|
| 129 |
+
with gr.Blocks(title="AI-Powered Differential Diagnosis (Educational)") as demo:
|
| 130 |
+
gr.Markdown("# AI-Powered Differential Diagnosis (Educational)")
|
| 131 |
+
gr.Markdown(disclaimer)
|
| 132 |
+
if _startup_error:
|
| 133 |
+
gr.Markdown(f"**Startup error:** {_startup_error}")
|
| 134 |
+
with gr.Row():
|
| 135 |
+
inp = gr.Textbox(label="Enter symptoms (comma-separated). Minimum 3.", placeholder="fever, cough, shortness of breath")
|
| 136 |
+
with gr.Row():
|
| 137 |
+
btn = gr.Button("Analyze")
|
| 138 |
+
clr = gr.ClearButton([inp])
|
| 139 |
+
with gr.Row():
|
| 140 |
+
dx = gr.Markdown(label="Differential Diagnoses")
|
| 141 |
+
with gr.Row():
|
| 142 |
+
chain_box = gr.Markdown(label="Structured reasoning steps")
|
| 143 |
+
with gr.Row():
|
| 144 |
+
prompt_box = gr.Markdown(label="Few-shot examples + hypothesis branches")
|
| 145 |
+
|
| 146 |
+
def on_analyze(text):
|
| 147 |
+
err, diffs, chain, prompt = infer_differential(text)
|
| 148 |
+
if err:
|
| 149 |
+
return err, "", ""
|
| 150 |
+
dx_md = "\n".join(diffs) if diffs else "No matches."
|
| 151 |
+
chain_md = "\n".join(chain) if chain else ""
|
| 152 |
+
prompt_md = "\n".join(prompt) if prompt else ""
|
| 153 |
+
return dx_md, chain_md, prompt_md
|
| 154 |
+
|
| 155 |
+
btn.click(on_analyze, inputs=[inp], outputs=[dx, chain_box,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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Patient_ID,Age,Gender,Symptom,Diagnosis_Category,Possible_Diagnosis
|
| 2 |
+
e5196724-d926-4fd7-bc20-e76a16b3d8a6,10,Female,wheezing,Respiratory Issues,asthma
|
| 3 |
+
1701efa5-1d30-4492-89c3-5f5f3174bf2e,24,Female,chest pain,Respiratory Issues,asthma
|
| 4 |
+
d307040a-3519-4c22-b676-ad10f3da80b1,66,Female,shortness of breath,Respiratory Issues,pneumonia
|
| 5 |
+
4ca668f9-077f-446e-aac5-8fb91d79b0b6,64,Female,rapid breathing,Respiratory Issues,pneumonia
|
| 6 |
+
8365de28-a73a-425d-8dce-6d6ada05d9c1,60,Female,cough,Respiratory Issues,pneumonia
|
| 7 |
+
95b09e49-3009-452b-bbb5-65bdf1d56c63,40,Male,chest pain,Respiratory Issues,asthma
|
| 8 |
+
ecace22a-1ee3-4db1-817e-a56166396c20,31,Female,wheezing,Respiratory Issues,asthma
|
| 9 |
+
d3e45a41-3a99-4ec1-a59c-f4964f73d32c,77,Male,wheezing,Respiratory Issues,pneumonia
|
| 10 |
+
6d928508-bd79-4c8d-926e-32b33f07d8c9,79,Female,fatigue,Respiratory Issues,pneumonia
|
| 11 |
+
dfcddeef-d7a9-4714-ad4d-c5ff84655dd1,37,Male,shortness of breath,Respiratory Issues,asthma
|
| 12 |
+
fd8b1144-2b14-4bf1-86b2-0fa44aeaaa5f,30,Female,fatigue,Respiratory Issues,asthma
|
| 13 |
+
03fde28a-cf69-418f-a6ba-7defea51ffe2,66,Male,wheezing,Respiratory Issues,pneumonia
|
| 14 |
+
58b0fcbb-3eab-4a44-ab4e-69a046a63ccd,79,Female,chest pain,Respiratory Issues,pneumonia
|
| 15 |
+
f572e2d8-e14f-4979-906b-de65c8444a3c,79,Female,fatigue,Respiratory Issues,pneumonia
|
| 16 |
+
be61a7ac-5222-454b-9655-8140176b06f7,28,Female,chest pain,Respiratory Issues,asthma
|
| 17 |
+
8ba5abc4-9770-4330-8651-2b4ad3ef8080,63,Male,chest pain,Respiratory Issues,pneumonia
|
| 18 |
+
7146aa31-4996-4967-a85c-b6463f810365,82,Female,shortness of breath,Respiratory Issues,pneumonia
|
| 19 |
+
f4fdafb5-e806-4fcd-a4a7-ec9db88bbb80,64,Male,shortness of breath,Respiratory Issues,pneumonia
|
| 20 |
+
6c005266-5794-48d6-a3c9-52cf9ca230fb,10,Female,fatigue,Respiratory Issues,asthma
|
| 21 |
+
b5b65186-dd5b-4bac-8cee-5f522fa2f6e4,70,Male,bluish lips or face,Respiratory Issues,pneumonia
|
| 22 |
+
c4f4ede7-5902-4464-aeb5-1933e89d0fe2,67,Female,fatigue,Respiratory Issues,pneumonia
|
| 23 |
+
d40c16da-7367-4650-ae38-7565412cfe10,63,Female,fatigue,Respiratory Issues,pneumonia
|
| 24 |
+
dd04a96e-19e9-41d4-b069-3a5d91c97417,68,Male,wheezing,Respiratory Issues,pneumonia
|
| 25 |
+
1764cc29-945c-4ca5-a8ff-e7f9d47ba4ca,30,Female,shortness of breath,Respiratory Issues,asthma
|
| 26 |
+
5b57f6bc-0b45-4abe-9818-f6e323b5be1d,66,Female,fatigue,Respiratory Issues,pneumonia
|
| 27 |
+
aa69f7e1-f091-4762-b943-8fbfd66830a8,16,Male,vomiting,Infectious Diseases,gastroenteritis
|
| 28 |
+
5419bbc5-9955-4795-beca-2d08e5534ef6,19,Female,diarrhea,Infectious Diseases,influenza
|
| 29 |
+
8006470f-3c05-4178-8365-427080011760,67,Female,fever,Infectious Diseases,gastroenteritis
|
| 30 |
+
3777258d-94c7-4fd9-b6ae-f9fda3279c5a,51,Female,vomiting,Infectious Diseases,gastroenteritis
|
| 31 |
+
c2312798-fc56-4eba-80db-42a4737e181c,76,Female,nausea,Infectious Diseases,gastroenteritis
|
| 32 |
+
58f6889d-86e7-4cdd-871e-d7d5f7d19799,75,Male,fever,Infectious Diseases,gastroenteritis
|
| 33 |
+
8ec95720-2631-46d8-9563-1f606ed13651,80,Female,sore throat,Infectious Diseases,influenza
|
| 34 |
+
3580c69b-c728-488e-a6af-5121b4db7e68,45,Female,headache,Infectious Diseases,influenza
|
| 35 |
+
587ba82e-b298-4412-8d36-a1a6f94c7c6c,36,Female,vomiting,Infectious Diseases,gastroenteritis
|
| 36 |
+
9f5b83c5-91e2-4d61-9e22-522d29912053,33,Female,nausea,Infectious Diseases,influenza
|
| 37 |
+
fa6c04ec-18e2-4ea1-9a40-c350f3cab7fc,29,Female,chills,Infectious Diseases,influenza
|
| 38 |
+
eafd6e30-14bc-4bcc-b36f-66126fa51025,87,Female,diarrhea,Infectious Diseases,influenza
|
| 39 |
+
347758cc-d261-48d3-88f6-ac584a890097,68,Male,rash,Infectious Diseases,gastroenteritis
|
| 40 |
+
4f88f312-5748-4f38-9f03-4852a8ae8756,65,Female,fever,Infectious Diseases,influenza
|
| 41 |
+
1033ae85-0031-4ffa-b5c6-f481ad43ba35,55,Male,sore throat,Infectious Diseases,gastroenteritis
|
| 42 |
+
08304a9f-04ce-44ca-90ce-7a245b9ee191,34,Female,rash,Infectious Diseases,influenza
|
| 43 |
+
544607c3-80ef-42f1-813d-93dfc8151e3b,56,Male,sore throat,Infectious Diseases,influenza
|
| 44 |
+
de247b6e-e866-415e-b90e-acde0e6f3458,11,Male,sore throat,Infectious Diseases,influenza
|
| 45 |
+
bb2fb19a-e7fe-4d60-a0d6-087f08431eb3,87,Female,headache,Infectious Diseases,influenza
|
| 46 |
+
4042f763-f4c1-4fcf-9893-c9294aa61cac,85,Female,muscle aches,Infectious Diseases,influenza
|
| 47 |
+
192c7cd0-1eca-4359-bc2e-92302c1956a5,67,Male,chills,Infectious Diseases,gastroenteritis
|
| 48 |
+
58fa335f-5fe5-4035-bb99-9604ea9bba19,33,Female,sore throat,Infectious Diseases,gastroenteritis
|
| 49 |
+
910d50d7-4006-4f1f-9f48-5a85e27435f8,31,Male,sore throat,Infectious Diseases,influenza
|
| 50 |
+
c8220203-44a8-422d-9caf-8fdfb74455af,66,Female,rash,Infectious Diseases,influenza
|
| 51 |
+
e7d07198-7366-40f0-90d1-676924f50e77,57,Male,rash,Infectious Diseases,influenza
|
| 52 |
+
ada45045-55f9-45c4-b7e8-4c32cf90884b,85,Female,palpitations,Cardiovascular Problems,myocardial infarction
|
| 53 |
+
952c6399-a5e7-40cc-ad16-e9bdc46f2a33,88,Female,shortness of breath,Cardiovascular Problems,angina
|
| 54 |
+
f42a478a-0f04-4bf5-9b3e-d86eb164e734,61,Female,dizziness,Cardiovascular Problems,angina
|
| 55 |
+
6f4446c1-45f1-4a19-90a5-c661e4196d43,83,Female,chest pain,Cardiovascular Problems,angina
|
| 56 |
+
9e4c5458-76ba-458d-a8ae-78c0bf38b62a,63,Male,chest pain,Cardiovascular Problems,myocardial infarction
|
| 57 |
+
9e34e72c-2629-4d4e-94fe-197e11ecd62e,54,Male,chest pain,Cardiovascular Problems,angina
|
| 58 |
+
7c67eff1-6017-4dc2-8df3-fc606c8a5bc4,60,Female,dizziness,Cardiovascular Problems,myocardial infarction
|
| 59 |
+
784e08aa-c8e9-4fc6-bcb9-42dd0ceadcba,41,Male,swelling in legs or ankles,Cardiovascular Problems,angina
|
| 60 |
+
62ed4a15-9733-47e6-a607-e7c233dc6d95,49,Male,palpitations,Cardiovascular Problems,myocardial infarction
|
| 61 |
+
6086656f-d4d1-463a-ada1-a32e9030dac5,52,Male,fatigue,Cardiovascular Problems,angina
|
| 62 |
+
0c142286-e290-41bc-81ed-4419d9c3d529,83,Female,sweating,Cardiovascular Problems,myocardial infarction
|
| 63 |
+
c887eba9-bac1-46a4-a6f6-f17063209dd2,65,Female,sweating,Cardiovascular Problems,angina
|
| 64 |
+
6a01bd00-328d-4ceb-a134-2269a7326f92,59,Female,sweating,Cardiovascular Problems,myocardial infarction
|
| 65 |
+
c09871c5-f11c-4897-b32d-371d07914b5b,75,Male,swelling in legs or ankles,Cardiovascular Problems,myocardial infarction
|
| 66 |
+
494be90d-318f-46f9-9e18-8423d8a5bd05,50,Male,nausea,Cardiovascular Problems,myocardial infarction
|
| 67 |
+
300c29a2-90f7-485d-a00e-786ee55248bb,81,Female,nausea,Cardiovascular Problems,angina
|
| 68 |
+
db557d51-177f-4742-871e-e3b5eab1981a,67,Male,swelling in legs or ankles,Cardiovascular Problems,angina
|
| 69 |
+
de20a72c-9cef-4f5f-8731-e17f166367b0,83,Male,dizziness,Cardiovascular Problems,angina
|
| 70 |
+
f9d9e95c-82fb-4fcd-acf5-6287593a8a55,73,Female,shortness of breath,Cardiovascular Problems,angina
|
| 71 |
+
2ee71a4b-6042-457a-9d1f-b3ce4a211fca,60,Female,palpitations,Cardiovascular Problems,myocardial infarction
|
| 72 |
+
9508716f-2b87-482c-ab8f-52840b0d7fad,49,Male,fatigue,Cardiovascular Problems,angina
|
| 73 |
+
b4f96040-4809-48a2-85a9-1ce572f2024c,60,Female,sweating,Cardiovascular Problems,angina
|
| 74 |
+
4ecaf3bb-4b31-4a59-98d2-dd0c4fdecf8d,73,Female,sweating,Cardiovascular Problems,angina
|
| 75 |
+
e4241e6e-e9fc-4fbd-88b7-bdb0aa0b292a,49,Male,shortness of breath,Cardiovascular Problems,myocardial infarction
|
| 76 |
+
60ba3b27-c65b-4796-933b-962c71e8c9ed,68,Female,sweating,Cardiovascular Problems,angina
|
| 77 |
+
a1d180f9-fbe7-429f-91de-a8643b44705b,37,Female,difficulty concentrating,Neurological Conditions,migraine
|
| 78 |
+
267274d4-91c9-4c9e-afb6-5e673b661e75,46,Female,difficulty concentrating,Neurological Conditions,tension headache
|
| 79 |
+
20603345-abb1-4053-8124-2c4ab7e5a496,23,Male,fatigue,Neurological Conditions,migraine
|
| 80 |
+
d39751ea-60c5-4157-8bee-d52513b0941a,32,Male,headache,Neurological Conditions,migraine
|
| 81 |
+
30bd706f-d4a8-4e66-8713-a5be896ad2c3,26,Female,fatigue,Neurological Conditions,tension headache
|
| 82 |
+
f35b5b47-7f3d-44b1-9f79-6001b47aa8f5,46,Male,vision problems,Neurological Conditions,tension headache
|
| 83 |
+
82b1d4de-6d27-4630-ae0c-ab1e675166a6,36,Male,sensitivity to light or sound,Neurological Conditions,migraine
|
| 84 |
+
8c6ed134-1a6d-4007-8bd0-6fea73dae00d,52,Male,numbness or tingling in limbs,Neurological Conditions,tension headache
|
| 85 |
+
76ae5326-078b-479f-917c-6c59135f45d4,26,Female,difficulty concentrating,Neurological Conditions,migraine
|
| 86 |
+
d2cae813-6aaa-4bfc-8b29-12663e1471b0,57,Male,sensitivity to light or sound,Neurological Conditions,tension headache
|
| 87 |
+
c8b320fe-c864-40cb-b464-ba3a65a3f312,33,Female,difficulty concentrating,Neurological Conditions,migraine
|
| 88 |
+
b3337e46-d98d-4366-9f41-db61c5361e7b,52,Female,dizziness,Neurological Conditions,tension headache
|
| 89 |
+
a5991127-5072-40d8-a56f-c15e8d57b226,21,Female,dizziness,Neurological Conditions,migraine
|
| 90 |
+
4ed207c9-bb8a-49aa-a416-fc71372f0059,36,Female,dizziness,Neurological Conditions,migraine
|
| 91 |
+
f4ed2ba4-f2ae-4532-b6ec-af67685fddc5,25,Male,dizziness,Neurological Conditions,tension headache
|
| 92 |
+
41fe4ad2-550f-4403-94b7-feb20985616f,47,Female,dizziness,Neurological Conditions,migraine
|
| 93 |
+
7f4cb7c0-73c2-4a11-bc1d-6b5ceb63443a,22,Male,sensitivity to light or sound,Neurological Conditions,migraine
|
| 94 |
+
b7b47e68-d37a-4fb0-a7af-2ff10a07dfcf,44,Female,fatigue,Neurological Conditions,migraine
|
| 95 |
+
b6bc4d0a-7810-41f0-b4d1-b1eb16f0af43,30,Female,difficulty concentrating,Neurological Conditions,tension headache
|
| 96 |
+
15c04876-44d6-46ba-8bd7-889b3e071db0,34,Male,sensitivity to light or sound,Neurological Conditions,tension headache
|
| 97 |
+
eaa71fdb-747a-4f19-8568-d638f049df4f,29,Female,fatigue,Neurological Conditions,migraine
|
| 98 |
+
89f95886-3f89-4ccb-96a3-91bbfbfde49d,36,Female,numbness or tingling in limbs,Neurological Conditions,migraine
|
| 99 |
+
8df4ead4-b030-4a9c-8626-cedef41b9414,37,Female,difficulty concentrating,Neurological Conditions,migraine
|
| 100 |
+
0a237f70-5a6f-4737-b374-540aec9f76ce,23,Female,vision problems,Neurological Conditions,tension headache
|
| 101 |
+
58a99d7a-84bf-4a2a-b9e9-de0bf2c594d0,26,Male,dizziness,Neurological Conditions,migraine
|
| 102 |
+
894b1fd3-d6f1-44e3-8beb-3a2e33bd9e9c,54,Female,loss of appetite,Gastrointestinal Issues,peptic ulcer disease
|
| 103 |
+
6d444410-e142-4c1c-9af9-548ccb8c5e83,25,Male,loss of appetite,Gastrointestinal Issues,irritable bowel syndrome
|
| 104 |
+
6e4164f2-4f4c-4b9c-8b4e-15b09b948037,36,Male,black or tarry stools,Gastrointestinal Issues,peptic ulcer disease
|
| 105 |
+
492bd156-97d2-49c4-99fa-96d78b0be039,51,Female,vomiting,Gastrointestinal Issues,peptic ulcer disease
|
| 106 |
+
15e13362-54e3-469c-af14-6de389ba64c4,47,Male,abdominal pain,Gastrointestinal Issues,peptic ulcer disease
|
| 107 |
+
2c151c91-2afb-4d8d-895d-37856c310d7e,49,Female,loss of appetite,Gastrointestinal Issues,irritable bowel syndrome
|
| 108 |
+
a5f614db-7640-4c1e-8b8e-8ed691dd1339,22,Female,heartburn,Gastrointestinal Issues,irritable bowel syndrome
|
| 109 |
+
0776e913-4171-40e0-9077-787f0c29b4e7,35,Female,loss of appetite,Gastrointestinal Issues,irritable bowel syndrome
|
| 110 |
+
920d2bba-f9a1-4fd6-81a0-469b6f325740,44,Male,nausea,Gastrointestinal Issues,peptic ulcer disease
|
| 111 |
+
15769a1e-b089-4368-a28e-e78e15dab152,50,Female,unexplained weight loss,Gastrointestinal Issues,irritable bowel syndrome
|
| 112 |
+
caa5e43b-73c6-4cdf-8a1b-ab473c371762,29,Female,vomiting,Gastrointestinal Issues,irritable bowel syndrome
|
| 113 |
+
d1d9a546-a77d-46f9-b387-fa5d6ac309c8,70,Male,abdominal pain,Gastrointestinal Issues,peptic ulcer disease
|
| 114 |
+
d15d78a1-5264-462d-b189-f103776a2b79,55,Female,abdominal pain,Gastrointestinal Issues,irritable bowel syndrome
|
| 115 |
+
5cd917c9-2ea8-4f26-9402-1e096aedaeb8,69,Male,bloating,Gastrointestinal Issues,peptic ulcer disease
|
| 116 |
+
f78c98ab-4de6-4e82-b9cd-3046ecfd5976,70,Female,heartburn,Gastrointestinal Issues,peptic ulcer disease
|
| 117 |
+
1a7bc724-ac59-43f4-b85e-952c0abddc30,21,Male,loss of appetite,Gastrointestinal Issues,irritable bowel syndrome
|
| 118 |
+
010ebd32-edc6-4aaa-9869-4635591761a9,20,Female,nausea,Gastrointestinal Issues,irritable bowel syndrome
|
| 119 |
+
d9240875-578a-44ce-905e-85e0e4287eb7,56,Female,vomiting,Gastrointestinal Issues,irritable bowel syndrome
|
| 120 |
+
e8719c5f-7864-4076-b67a-7a442de40d3d,46,Female,black or tarry stools,Gastrointestinal Issues,peptic ulcer disease
|
| 121 |
+
76d42a10-5380-48f8-a5bd-d21749b1ef0a,47,Female,nausea,Gastrointestinal Issues,irritable bowel syndrome
|
| 122 |
+
773991ce-b91f-4e8c-b127-82d29d7279c7,47,Male,vomiting,Gastrointestinal Issues,irritable bowel syndrome
|
| 123 |
+
a11447c4-4bb0-4ed3-8c78-2b3daac47c4d,86,Male,vomiting,Gastrointestinal Issues,peptic ulcer disease
|
| 124 |
+
25a28b30-0461-4136-8252-1edf91bfabf5,44,Female,abdominal pain,Gastrointestinal Issues,peptic ulcer disease
|
| 125 |
+
8bc8515b-42f4-4d30-9556-690260adcb02,51,Male,abdominal pain,Gastrointestinal Issues,irritable bowel syndrome
|
| 126 |
+
57dcbe04-0cac-4434-99e2-925d00a66a7a,75,Male,heartburn,Gastrointestinal Issues,peptic ulcer disease
|
| 127 |
+
cfca11f6-ec86-47f1-bc1a-3f72c0a6bde5,87,Female,fatigue,Endocrine/Metabolic Conditions,hypothyroidism
|
| 128 |
+
e80443ec-f0f3-4a47-9463-2fe8f4a5ed9a,74,Female,slow wound healing,Endocrine/Metabolic Conditions,hypothyroidism
|
| 129 |
+
9fab1e5d-75c6-4679-ad91-647edcc01ccc,85,Male,increased thirst,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 130 |
+
07eb756a-ed87-4fc4-bb67-804bcaad9c6c,43,Male,increased thirst,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 131 |
+
1e89486f-08c0-4908-b823-72e205bebb3e,35,Female,increased thirst,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 132 |
+
9fdef3f0-2b29-4ca8-bc5d-17eb4c1bedf6,31,Male,blurred vision,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 133 |
+
c86a5eb4-a46b-4154-b7fa-d05cff503147,51,Male,tingling in hands/feet,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 134 |
+
944f0f4d-0516-414f-bd0e-0800daf79743,38,Female,increased thirst,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 135 |
+
55c84c73-752d-4a92-8fb0-671a8a4dc99c,62,Female,fatigue,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 136 |
+
eb8d3936-ba3d-44db-a350-8ac762fd2860,71,Female,fatigue,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 137 |
+
4a709556-3026-42bd-b2cc-146b2d94e25b,49,Female,increased thirst,Endocrine/Metabolic Conditions,hypothyroidism
|
| 138 |
+
8d852f42-7cc8-47e2-869b-aa45ddc635d9,43,Female,blurred vision,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 139 |
+
befa5743-bc10-4463-949f-0598b5e69200,41,Male,tingling in hands/feet,Endocrine/Metabolic Conditions,hypothyroidism
|
| 140 |
+
12dd30e9-cfb2-4ed7-bcaa-caf667e953c6,33,Female,tingling in hands/feet,Endocrine/Metabolic Conditions,hypothyroidism
|
| 141 |
+
ad293c4f-5477-4a1c-9a06-41747b007b5b,83,Male,fatigue,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 142 |
+
b10b6704-f645-421f-818f-d7bfdcfbf3e8,55,Male,slow wound healing,Endocrine/Metabolic Conditions,hypothyroidism
|
| 143 |
+
ad679c3f-14a0-4e3c-8a62-14cc34699178,86,Female,tingling in hands/feet,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 144 |
+
fd2942cf-94cb-4a11-9403-4ef40e7ead29,60,Female,blurred vision,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 145 |
+
83c3eacc-5332-4bb3-ab18-9f77172bf8e8,54,Female,unintended weight loss,Endocrine/Metabolic Conditions,hypothyroidism
|
| 146 |
+
36e8d9f3-3e27-42ff-b91f-0e353843173f,44,Male,unintended weight loss,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 147 |
+
469fc948-9b1c-4715-914b-1bfebcb00084,48,Female,slow wound healing,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 148 |
+
3b81d029-0577-4701-8303-30614519e841,59,Female,increased thirst,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 149 |
+
563ce512-c226-482d-b8e6-a1a8a642437b,36,Female,frequent urination,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 150 |
+
a1f2c14f-07c3-4a9c-9b69-83bbc6e3fa31,45,Female,tingling in hands/feet,Endocrine/Metabolic Conditions,diabetes mellitus
|
| 151 |
+
8a55134d-b061-411a-ab6e-bdaaf9691490,37,Female,unintended weight loss,Endocrine/Metabolic Conditions,hypothyroidism
|
| 152 |
+
845fa5b6-adbc-41ce-b6e2-b9cbd368301f,40,Female,limited range of motion,Musculoskeletal Disorders,gout
|
| 153 |
+
ced1bb49-9664-41cf-be5b-60bd4bef53a7,62,Female,swelling,Musculoskeletal Disorders,gout
|
| 154 |
+
9497ccd2-4014-4ee2-bb64-daad397b1e42,50,Female,swelling,Musculoskeletal Disorders,arthritis
|
| 155 |
+
0664a304-87a3-4fce-8d0a-44d819740eaf,60,Female,stiffness,Musculoskeletal Disorders,arthritis
|
| 156 |
+
d289dfa8-0edb-4cad-a1d1-465ccfcd13d3,43,Female,muscle weakness,Musculoskeletal Disorders,gout
|
| 157 |
+
f5f9ee53-fa37-4e55-a33a-0f480788e38b,71,Female,swelling,Musculoskeletal Disorders,arthritis
|
| 158 |
+
1c7bb014-4be0-4b50-85cb-93386014498c,62,Female,stiffness,Musculoskeletal Disorders,arthritis
|
| 159 |
+
1d0dd189-91e8-4589-9983-9619f75e2f1d,81,Female,warmth around joints,Musculoskeletal Disorders,arthritis
|
| 160 |
+
763818a8-5227-436d-8ff7-0e03fbdcd88a,81,Female,stiffness,Musculoskeletal Disorders,gout
|
| 161 |
+
2cacbb39-acb4-4da7-87f0-9a62909b7488,89,Female,swelling,Musculoskeletal Disorders,arthritis
|
| 162 |
+
8e921dcc-1e87-4785-9b2e-5ebb86046f2d,51,Male,stiffness,Musculoskeletal Disorders,arthritis
|
| 163 |
+
4ed303d8-f60a-4f4a-a4f5-f64d944f4fd4,43,Female,warmth around joints,Musculoskeletal Disorders,gout
|
| 164 |
+
aae0c18e-6a61-41cc-8f87-04dfe390ff60,57,Female,limited range of motion,Musculoskeletal Disorders,gout
|
| 165 |
+
a512352d-6bb5-495e-97ca-40c661c97bb6,43,Male,limited range of motion,Musculoskeletal Disorders,arthritis
|
| 166 |
+
40bd078e-438b-4b53-8d16-3399b55fb768,73,Male,joint pain,Musculoskeletal Disorders,gout
|
| 167 |
+
b724dcdf-90dc-4a80-b59f-ad6ffc9272c8,41,Male,stiffness,Musculoskeletal Disorders,gout
|
| 168 |
+
1ff575e0-18ef-42a2-9036-a6dd9fc22a90,62,Female,joint pain,Musculoskeletal Disorders,gout
|
| 169 |
+
918cade0-c87e-48f7-884f-5657fb59683e,65,Female,swelling,Musculoskeletal Disorders,gout
|
| 170 |
+
20d4fe89-cc41-47e2-bd46-76492be4a93c,71,Male,warmth around joints,Musculoskeletal Disorders,gout
|
| 171 |
+
d4c969e7-a2f8-4fc3-baa4-a941a9ccdaa4,85,Male,swelling,Musculoskeletal Disorders,gout
|
| 172 |
+
55fe91cb-56ce-4c56-a149-d4ff0cb20246,74,Male,joint pain,Musculoskeletal Disorders,gout
|
| 173 |
+
3ec18364-956d-4dc5-9b7f-09524e057812,69,Female,limited range of motion,Musculoskeletal Disorders,gout
|
| 174 |
+
8d1523b1-89e7-45ba-82ff-d815a6d125ae,86,Female,muscle weakness,Musculoskeletal Disorders,arthritis
|
| 175 |
+
929d3c33-3b20-4a7c-83d3-b780d5200ff4,81,Female,limited range of motion,Musculoskeletal Disorders,gout
|
| 176 |
+
be19c30d-eee0-4dfe-8a06-01f41122f8a8,47,Male,swelling,Musculoskeletal Disorders,gout
|
requirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
gradio>=4.44.0
|
| 3 |
+
pandas>=2.0.0
|
| 4 |
+
scikit-learn>=1.3.0
|
| 5 |
+
numpy>=1.24.0
|